Home > Archive > PostgreSQL Newbies > June 2005 > Wrong SQLSTATE returned?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Wrong SQLSTATE returned?
Babak Asadi

2005-06-04, 1:23 pm

Hi,

I'm using ADO to connect to my PostgreSQL instance. When I use a
SELECT statement that references a non-existent column in an existing
table I get a SQLSTATE error S1000 code with native error code 7.

I should note that the error description that ADO returns is "column
'mycolymn' does not exist" with a generic ADO unknown error code.

Am I not supposed to get a SQLSTATE code of: 42703 UNDEFINED COLUMN?

Thanks,
Babak

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

Tom Lane

2005-06-05, 3:23 am

Babak Asadi <basadi@gmail.com> writes:
> I'm using ADO to connect to my PostgreSQL instance. When I use a
> SELECT statement that references a non-existent column in an existing
> table I get a SQLSTATE error S1000 code with native error code 7.


> Am I not supposed to get a SQLSTATE code of: 42703 UNDEFINED COLUMN?


Well, there is certainly no part of the Postgres code that will return
'S1000', so I have to suppose that ADO is inserting that SQLSTATE value.
You'd probably best ask about this on an ADO list ...

regards, tom lane

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

Greg Sabino Mullane

2005-06-14, 3:24 am


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I'm using ADO to connect to my PostgreSQL instance. When I use a
> SELECT statement that references a non-existent column in an existing
> table I get a SQLSTATE error S1000 code with native error code 7.
> ...
> Am I not supposed to get a SQLSTATE code of: 42703 UNDEFINED COLUMN?


S1000 is a "generic error" that is returned when a driver (in Perl DBI
land anyway) does not implement SQLSTATE. That could certainly be the case
here. You could test to see if it ever returns anything except S1000:
if so, it's probably a bug in the driver. If not, someone may need to
write in full SQLSTATE support.

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200506121500
http://biglumber.com/x/web? pk=2529...14964
AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFCrIgzvJuQZxSW
SsgRAq7gAJ9P7W+RLp/JtdoO//s+egTtrN/DFQCg25Eb
NrR9EWd9t/kFJZC+9ObMzwY=
=KOv9
-----END PGP SIGNATURE-----



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql
.org

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com