Re: [COMMITTERS] pgsql: Add STRICT to PL/pgSQL SELECT INTO, so exceptions

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [COMMITTERS] pgsql: Add STRICT to PL/pgSQL SELECT INTO, so exceptions
Date: 2006-06-16 22:02:45
Message-ID: 200606162202.k5GM2jh21017@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> Plan B is to invent new errcodes to match the Oracle spellings. If
> >> that's what we want to do, it's not that hard.
>
> > We could use:
> > #define ERRCODE_DATA_EXCEPTION MAKE_SQLSTATE('2','2',
> > or
> > #define ERRCODE_ERROR_IN_ASSIGNMENT MAKE_SQLSTATE('2','2',
>
> Those are both mighty generic (in fact DATA_EXCEPTION is a class code
> not a specific error). If we want to stick to existing errcodes I think
> CARDINALITY_VIOLATION is the only reasonable choice.

If we go with that how does the caller check between not found and too
many? And if we go with Oracle names, I need different codes to match
with the two Oracle names.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2006-06-16 22:05:01 pgsql: Add: > > * Fix CREATE CAST on DOMAINs > >
Previous Message Bruce Momjian 2006-06-16 22:01:24 pgsql: Document issues with non-default tablespaces and pg_dumpall

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-06-16 22:05:06 Re: bug? non working casts for domain
Previous Message Tom Lane 2006-06-16 21:55:54 Re: [COMMITTERS] pgsql: Add STRICT to PL/pgSQL SELECT INTO, so exceptions are thrown if