"David E. Wheeler" <da...@kineticode.com> writes:
> Yeah, that was just an aside. I liked that I got different errors when  
> there were different numbers of columns than when the data types of  
> the columns disagreed. I'm not sure that SYNTAX ERROR is a great code  
> for when the count disagrees, but at least it's distinct from the  
> column data type error.

> And I'm going on SQLSTATE here because I'm doing exception handling in  
> pl/PgSQL and want to handle the two errors differently.

So really what you're wishing for is that we treat different-numbers-of-
columns as a whole new SQLSTATE inside category 42.  What's the argument
for needing to handle this differently from DATATYPE_MISMATCH?

> Okay. I'll have to see what I can do with SQLERRM then. But isn't it  
> localized?

Yeah, it is.  You don't really want code looking at that to decide what
to do, if you can possibly avoid it.  It's intended for human consumption.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to