| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | Neil Conway <neilc(at)samurai(dot)com> | 
| Cc: | Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>, pgsql-patches(at)postgresql(dot)org | 
| Subject: | Re: plpgsql raise - parameters can be expressions | 
| Date: | 2005-06-15 13:57:36 | 
| Message-ID: | 2346.1118843856@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-patches | 
Neil Conway <neilc(at)samurai(dot)com> writes:
> BTW, is there any value in a separate "EXCEPTION" type? ISTM that an 
> exception is just a SQLSTATE, which is in turn just a string. A separate 
> exception type does simplify the parsing of RAISE, but I wonder if it 
> would be useful to be able to also allow specifying the SQLSTATE code as 
> a string literal.
It would save some typing, but I do not think we can make the proposed
syntax work if we do it that way:
>> RAISE level [ exception_name , ] format_string [ , parameters ] ;
>> 
>> where "level" is one of the already-defined level keywords?
How will you tell whether the string literal just after "level" is meant
to be a SQLSTATE or a format?  Maybe with some ad-hoc tests, but ugh ...
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2005-06-15 17:25:58 | Lexer patch question | 
| Previous Message | Bruce Momjian | 2005-06-15 13:55:42 | Re: pg_autovacuum patch to display db name in log file is broken |