Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Inconsistent Errors on Row Comparisons


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: "David E. Wheeler" <david(at)kineticode(dot)com>
  • Cc: pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>
  • Subject: Re: Inconsistent Errors on Row Comparisons
  • Date: Tue, 30 Jun 2009 14:18:02 -0400
  • Message-id: <23239.1246385882@sss.pgh.pa.us> <text/plain>

"David E. Wheeler" <david(at)kineticode(dot)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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group