Re: Inconsistent Errors on Row Comparisons
От | Tom Lane |
---|---|
Тема | Re: Inconsistent Errors on Row Comparisons |
Дата | |
Msg-id | 23239.1246385882@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Inconsistent Errors on Row Comparisons ("David E. Wheeler" <david@kineticode.com>) |
Ответы |
Re: Inconsistent Errors on Row Comparisons
|
Список | pgsql-hackers |
"David E. Wheeler" <david@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
В списке pgsql-hackers по дате отправления: