Re: Conflicted names of error conditions.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Conflicted names of error conditions.
Date: 2010-08-16 16:08:42
Message-ID: 6142.1281974922@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dmitriy Igrishin <dmitigr(at)gmail(dot)com> writes:
> According to
> http://www.postgresql.org/docs/9.0/static/errcodes-appendix.html
> some error conditions has non-unique *names*. There are:
> modifying_sql_data_not_permitted,
> prohibited_sql_statement_attempted,
> reading_sql_data_not_permitted
> from SQL Routine Exception and External Routine Exception classes.

> It should be?

Yup, that's what the SQL standard calls them :-(. In practice, either
underlying SQLSTATE will match that name in an EXCEPTION block, so
it doesn't matter a whole lot. If you have a case where you feel it
does matter, you can trap by the SQLSTATE code instead.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-08-16 16:12:53 Re: "Bogus data in lock file" shouldn't be FATAL?
Previous Message Alvaro Herrera 2010-08-16 16:02:51 Re: Committers info for the git migration - URGENT!