Alain Picard | 3 Feb 2003 01:06

ODBC breaks COUNTS, SEQUENCES as of Postgresql 7.3


Dear ODBC users,

I have an application, written in lisp, which uses the unixODBC
driver manager (though I've tested what follows with iODBC, with
the same results).  I have no real control over how the ODBC library
is being used in this application; it comes from a 3rd party vendor.
I'm trying to reverse engineer what they do via customer support and
inspecting the ODBC trace log files.

On the the problem.
With versions of Postgresql <= 7.2, I would obtain the following
results,

    (select [count [*]] :from [foo])
     => 
    ((73))
    ("count")

As of 7.3, I am now obtaining 

    (select [count [*]] :from [foo])
     => 
    (("73"))
    ("count")

Note the 73 is now "73".  My understanding is that this is because as
of 7.3, postgresql now reports counts, sequences, etc as INTEGER8,
whereas they were previously INTEGER4.  

(Continue reading)

Tom Lane | 3 Feb 2003 01:37
Picon

Re: ODBC breaks COUNTS, SEQUENCES as of Postgresql 7.3

Alain Picard <Alain.Picard <at> memetrics.com> writes:
>  b) how to get 7.3 to return numbers via ODBC

I dunno anything about fixing ODBC, but the standard advice for avoiding
client-side problems with int8 is to cast the result of count(*) back to
int4:

	select count(*)::integer from ...

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Tambet Matiisen | 3 Feb 2003 13:42
Picon

Re: psqlodbc.dll crash


----- Original Message -----
From: "Tambet Matiisen" <t.matiisen <at> aprote.ee>
To: <pgsql-odbc <at> postgresql.org>
Sent: Friday, January 31, 2003 11:39 AM
Subject: [ODBC] psqlodbc.dll crash

> Psqlodbc.dll crashes my application occasionally with following error:
> Unhandled exception in VB6.EXE (PSQLODBC.DLL): 0xC0000005: Access
Violation.
>
> The error occurs when I have 3 opened ADO recordsets, I requery all of
them
> and then open one more recordset. And I have to do this 5-6 times to get
> this error. All recordsets are static and client-side. If someone could
send
> me debug version of the dll, I could give more information.
>
>   Tambet
>
>

I resolved the issue, parameters of one of the recordsets did not have
default values. But it still indicates, that error handling in driver could
be improved. The query executed was:

conn=82461600, query='SELECT kood as "Kood", nimetus as "Nimetus",
prioriteet as "Prioriteet", mat_id, yhik, erikaal, viimane_hind,
broneeritud, olemas, tellitud, (mat.tellitud + mat.olemas - mat.broneeritud)
AS saldo FROM materjalid mat WHERE kood LIKE '' AND lower(nimetus) LIKE
(Continue reading)

Ocke Janssen | 3 Feb 2003 14:57
Picon

OpenOffice and PostgreSQL: query with inner join

Hello,

my name is Ocke Janssen. I'm a developer of the database component in 
OpenOffice and I encounter a problem (BUG) we have when executing a 
query which contains two tables with a primary key. The statement looks 
like this:

SELECT "test1"."name", "test1_1"."name" FROM "test1" "test1", "test1" 
"test1_1" WHERE ( "test1"."id" = "test1_1"."id" )

When setting the statement attributes to KeysetDriven, I get the error 
message that CTID is ambiguous. As far as I could see in the moment the 
problem is in the fucntion inner_process_tokens in file convert.c where 
CTID is added to the statemement. Is this problem known?

Best regards,

Ocke

--

-- 
dba.OpenOffice.org
			Example isn't another way to teach, 
			it is the only way to teach.  
			Albert Einstein

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo <at> postgresql.org so that your
message can get through to the mailing list cleanly

(Continue reading)

Andrea Aime | 3 Feb 2003 18:29
Picon
Favicon

Driver crash

Hi,
I'm experiencing the same problem Tambet Matiisen reported
some days ago (access violation with 0xC0000005 code). I
do experience this with Autocad Map 5 on a win2000 sp3
machine, connecting to postgresq 7.1.3 on a suse 7.x (don't know exactly
wich version). I've tried various drivers, namely 7.01.07,
7.01.10, 7.02.01, 7.02.05 and the 7.3 preview found on
Hiroshi Hinoue home page, and I always get the same
exception. I have a commlog and a mylog for 7.01.007
(the last one I remembered to be working, but it seems
that now even this doesn't work). Who wants them (mylog
is big, so I haven't attached them here)?

I also tried to build and debug the driver myself, but it seems that
you have removed the possibility to work with visual studio
lately (afaik autoconf and automake are needed to build the
thing now)
I'm stuck and in a hurry at the same time: anybody can
help me?
Best regards
Andrea Aime

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Dave Page | 3 Feb 2003 20:58
Picon

Re: Driver crash

 Andrea Aime allegedly said:

> I also tried to build and debug the driver myself, but it seems that
> you have removed the possibility to work with visual studio
> lately (afaik autoconf and automake are needed to build the
> thing now)
> I'm stuck and in a hurry at the same time: anybody can
> help me?

I don't know about the error itself, but you can still use VC++. you may
need to grab a couple of windows specific files from CVS that are missing
from the tarball though. setup.c is one, not sure about others offhand.
Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo <at> postgresql.org)

Andrea Aime | 3 Feb 2003 21:55
Picon
Favicon

Re: Driver crash

I also did a checkout from CVS but there's a file that includes
config.h (not sure about the name) which is not in the CVS,
that there's a config.h.in which is usually manipulated by
the autotools... Moreover when I try to link the whole think
I get undefined symbol errors...
Best regards
Andrea Aime

PS: is there any active developer that wants to look at the
log files?

On Monday 03 February 2003 20:58, Dave Page wrote:
>  Andrea Aime allegedly said:
> > I also tried to build and debug the driver myself, but it seems that
> > you have removed the possibility to work with visual studio
> > lately (afaik autoconf and automake are needed to build the
> > thing now)
> > I'm stuck and in a hurry at the same time: anybody can
> > help me?
>
> I don't know about the error itself, but you can still use VC++. you may
> need to grab a couple of windows specific files from CVS that are missing
> from the tarball though. setup.c is one, not sure about others offhand.
> Regards, Dave.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo <at> postgresql.org)
(Continue reading)

Michael Calabrese | 3 Feb 2003 23:16
Picon
Favicon

Re: Error when accessing tables with deleted columns

I just wanted people to know  if you have deleted a
column in postgres and can not relink the tables in MS
Access, the current solution is to 
dump the database and reload it.

I was using 7.2.5 version of the odbc driver and
tested the CVS that Dave kindly arranged for me.  If
someone would like me to test a later CVS please just
email me with the location of a compiled version and I
will attempt to recreate my problem.

Thanks for everyones help,
Michael

--- Dave Page <dpage <at> vale-housing.co.uk> wrote:
> 
> 
> > -----Original Message-----
> > From: Michael Calabrese
> [mailto:m2calabr <at> yahoo.com] 
> > Sent: 29 January 2003 22:20
> > To: pgsql-odbc <at> postgresql.org
> > Subject: Re: [ODBC] Error when accessing tables
> with deleted columns 
> > 
> > 
> > Thank you for the fast responce WOW.  I could not
> ask
> > for better. 
> 
(Continue reading)

Alain Picard | 4 Feb 2003 04:06

unixODBC, PostgreSQL 7.3 + ODBC V3 drivers?


Dear unixODBC and psqlodbc maintainers,

I'm trying to use unixODBC with the latest (CVS) psqlodbc library
with PostgreSQL 7.3.

This is all working fine, but, as of 7.3 PostgreSQL returns
aggregate types (e.g. SUMs, COUNTs) as INTEGER8, and so these
results are (correctly) mapped to string types by the ODBC V2 driver.

On Windows NT, using the experimental psqlodbc V3 driver, things
work properly and I get numbers back.  On Linux, however, compiling
the experimental psqlodbc V3 driver results in problems.  (I did
this by defining ODBCVER to be 0x0351 in config.h)

When I try to connect to the DB, I get the following error:

>  Error: Sql-Database-Data-Error id HY092[28] : [unixODBC]ColAttribute for this type not implemented yet

The relevant place in the SQL log file indicates:

>    [ODBC][31769][SQLColAttributes.c][230]
>		    Entry:
>			    Statement = 0x80723c8
>			    Column Number = 1
>			    Field Identifier = 0
>			    Character Attr = 0x807dc98
>			    Buffer Length = 4
>			    String Length = 0x805cd96
>			    Numeric Attribute = 0x805cd90
(Continue reading)

Hiroshi Inoue | 4 Feb 2003 04:56
Picon

Re: psqlodbc.dll crash

used = -5 means SQL_DEFAULT_PARAM. I changed the driver
to ignore it. Please try the lastest snapshot dll at
  http://www.geocities.jp/inocchichichi/psqlodbc/.

Thanks for your report.

Hiroshi Inoue
	http://www.geocities.jp/inocchichichi/psqlodbc/

Tambet Matiisen wrote:
> 
> ----- Original Message -----
> From: "Tambet Matiisen" <t.matiisen <at> aprote.ee>
> To: <pgsql-odbc <at> postgresql.org>
> Sent: Friday, January 31, 2003 11:39 AM
> Subject: [ODBC] psqlodbc.dll crash
> 
> > Psqlodbc.dll crashes my application occasionally with following error:
> > Unhandled exception in VB6.EXE (PSQLODBC.DLL): 0xC0000005: Access
> Violation.
> >
> > The error occurs when I have 3 opened ADO recordsets, I requery all of
> them
> > and then open one more recordset. And I have to do this 5-6 times to get
> > this error. All recordsets are static and client-side. If someone could
> send
> > me debug version of the dll, I could give more information.
> >
> >   Tambet
> >
(Continue reading)


Gmane