pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #6724: EXCEPTION syntax not recgonised
2+ messages / 2 participants
[nested] [flat]
* BUG #6724: EXCEPTION syntax not recgonised
@ 2012-07-09 17:19 chine.bleu@yahoo.com
2012-07-10 04:02 ` Re: BUG #6724: EXCEPTION syntax not recgonised Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: chine.bleu@yahoo.com @ 2012-07-09 17:19 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 6724
Logged by: Chine Bleu
Email address: chine.bleu@yahoo.com
PostgreSQL version: 9.0.4
Operating system: macosx
Description:
query: BEGIN
INSERT INTO config (name, value) VALUES (E'dbexp', E'10');
EXCEPTION WHEN unique_violation THEN
UPDATE config SET value=E'10' WHERE name=E'dbexp';
END error: fatal query: ERROR: syntax error at or near "INSERT"
LINE 2: INSERT INTO config (name, value) VALUES (E'dbexp', E'10');
^
query: BEGIN;
INSERT INTO config (name, value) VALUES (E'dbexp', E'10');
EXCEPTION WHEN unique_violation THEN
UPDATE config SET value=E'10' WHERE name=E'dbexp';
END error: fatal query: ERROR: syntax error at or near "EXCEPTION"
LINE 3: EXCEPTION WHEN unique_violation THEN
^
This is so much easier than implementing that horror of REPLACE everyone
else has somehow figured out how to implement.
And, no, I don't really expect an answer. I will continue to use the
DELETE...;;INSERT... improvement on REPLACE.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #6724: EXCEPTION syntax not recgonised
2012-07-09 17:19 BUG #6724: EXCEPTION syntax not recgonised chine.bleu@yahoo.com
@ 2012-07-10 04:02 ` Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Stehule @ 2012-07-10 04:02 UTC (permalink / raw)
To: chine.bleu@yahoo.com; +Cc: pgsql-bugs
Hello
This is not bug
keyword EXCEPTION is supported only in plpgsql.
Regards
Pavel Stehule
2012/7/9 <chine.bleu@yahoo.com>:
> The following bug has been logged on the website:
>
> Bug reference: 6724
> Logged by: Chine Bleu
> Email address: chine.bleu@yahoo.com
> PostgreSQL version: 9.0.4
> Operating system: macosx
> Description:
>
> query: BEGIN
> INSERT INTO config (name, value) VALUES (E'dbexp', E'10');
> EXCEPTION WHEN unique_violation THEN
> UPDATE config SET value=E'10' WHERE name=E'dbexp';
> END error: fatal query: ERROR: syntax error at or near "INSERT"
> LINE 2: INSERT INTO config (name, value) VALUES (E'dbexp', E'10');
> ^
>
>
> query: BEGIN;
> INSERT INTO config (name, value) VALUES (E'dbexp', E'10');
> EXCEPTION WHEN unique_violation THEN
> UPDATE config SET value=E'10' WHERE name=E'dbexp';
> END error: fatal query: ERROR: syntax error at or near "EXCEPTION"
> LINE 3: EXCEPTION WHEN unique_violation THEN
> ^
>
> This is so much easier than implementing that horror of REPLACE everyone
> else has somehow figured out how to implement.
>
> And, no, I don't really expect an answer. I will continue to use the
> DELETE...;;INSERT... improvement on REPLACE.
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-07-10 04:02 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-07-09 17:19 BUG #6724: EXCEPTION syntax not recgonised chine.bleu@yahoo.com
2012-07-10 04:02 ` Pavel Stehule <pavel.stehule@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