pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPLPGSQL/EXCEPTION HANDLING
4+ messages / 2 participants
[nested] [flat]
* PLPGSQL/EXCEPTION HANDLING
@ 2006-06-13 04:55 renneyt@yahoo.com <renneyt@yahoo.com>
0 siblings, 1 reply; 4+ messages in thread
From: renneyt@yahoo.com @ 2006-06-13 04:55 UTC (permalink / raw)
To: pgsql-admin
In a function implemented in 7.4.8 I had the following error when I call
the function:
ERROR: syntax error at or near "EXCEPTION"
Offending line is:
EXCEPTION WHEN dup_val_on_index THEN NULL;
When this line is removed, all is well.
Any help appreciated...
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PLPGSQL/EXCEPTION HANDLING
@ 2006-06-13 05:10 Jaime Casanova <systemguards@gmail.com>
parent: renneyt@yahoo.com <renneyt@yahoo.com>
0 siblings, 1 reply; 4+ messages in thread
From: Jaime Casanova @ 2006-06-13 05:10 UTC (permalink / raw)
To: renneyt@yahoo.com <renneyt@yahoo.com>; +Cc: pgsql-admin
On 6/12/06, renneyt@yahoo.com <renneyt@yahoo.com> wrote:
> In a function implemented in 7.4.8 I had the following error when I call
> the function:
>
> ERROR: syntax error at or near "EXCEPTION"
>
> Offending line is:
> EXCEPTION WHEN dup_val_on_index THEN NULL;
>
> When this line is removed, all is well.
>
that's because that construction was added in 8.0, you have to upgrade to use it
--
regards,
Jaime Casanova
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PLPGSQL/EXCEPTION HANDLING
@ 2006-06-13 13:56 renneyt@yahoo.com <renneyt@yahoo.com>
parent: Jaime Casanova <systemguards@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: renneyt@yahoo.com @ 2006-06-13 13:56 UTC (permalink / raw)
To: Jaime Casanova <systemguards@gmail.com>; +Cc: pgsql-admin
Jaime Casanova wrote:
> On 6/12/06, renneyt@yahoo.com <renneyt@yahoo.com> wrote:
>> In a function implemented in 7.4.8 I had the following error when I call
>> the function:
>>
>> ERROR: syntax error at or near "EXCEPTION"
>>
>> Offending line is:
>> EXCEPTION WHEN dup_val_on_index THEN NULL;
>>
>> When this line is removed, all is well.
>>
>
> that's because that construction was added in 8.0, you have to upgrade
> to use it
>
What part of the original construction is not supported?
Are any "exception when" statements supported?
Thanks
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PLPGSQL/EXCEPTION HANDLING
@ 2006-06-14 02:49 Jaime Casanova <systemguards@gmail.com>
parent: renneyt@yahoo.com <renneyt@yahoo.com>
0 siblings, 0 replies; 4+ messages in thread
From: Jaime Casanova @ 2006-06-14 02:49 UTC (permalink / raw)
To: renneyt@yahoo.com <renneyt@yahoo.com>; +Cc: pgsql-admin
On 6/13/06, renneyt@yahoo.com <renneyt@yahoo.com> wrote:
> Jaime Casanova wrote:
> > On 6/12/06, renneyt@yahoo.com <renneyt@yahoo.com> wrote:
> >> In a function implemented in 7.4.8 I had the following error when I call
> >> the function:
> >>
> >> ERROR: syntax error at or near "EXCEPTION"
> >>
> >> Offending line is:
> >> EXCEPTION WHEN dup_val_on_index THEN NULL;
> >>
> >> When this line is removed, all is well.
> >>
> >
> > that's because that construction was added in 8.0, you have to upgrade
> > to use it
> >
> What part of the original construction is not supported?
> Are any "exception when" statements supported?
>
all the BEGIN .. EXCEPTION block:
[ <<label>> ]
[ DECLARE
declarations ]
BEGIN
statements
EXCEPTION
WHEN condition [ OR condition ... ] THEN
handler_statements
[ WHEN condition [ OR condition ... ] THEN
handler_statements
... ]
END;
all you can do until 7.4.x was:
http://www.postgresql.org/docs/7.4/static/plpgsql-errors-and-messages.html
--
Atentamente,
Jaime Casanova
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-06-14 02:49 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-06-13 04:55 PLPGSQL/EXCEPTION HANDLING renneyt@yahoo.com <renneyt@yahoo.com>
2006-06-13 05:10 ` Jaime Casanova <systemguards@gmail.com>
2006-06-13 13:56 ` renneyt@yahoo.com <renneyt@yahoo.com>
2006-06-14 02:49 ` Jaime Casanova <systemguards@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox