Re: BUG #4704: syntax error at or near "RETURNING"

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Brad Constantinescu <brad(dot)constantinescu(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4704: syntax error at or near "RETURNING"
Date: 2009-03-14 15:47:04
Message-ID: 162867790903140847g6d0b4076u2d7eba2d7c3f3fa@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello

it's not bug,

8.1 doesn't support RETURNING clause

http://www.postgresql.org/docs/8.1/static/sql-insert.html

please, upgrade to current stable release (8.3)

regards
Pavel Stehule

2009/3/14 Brad Constantinescu <brad(dot)constantinescu(at)gmail(dot)com>:
>
> The following bug has been logged online:
>
> Bug reference:      4704
> Logged by:          Brad Constantinescu
> Email address:      brad(dot)constantinescu(at)gmail(dot)com
> PostgreSQL version: 8.1.4
> Operating system:   FreeBSD
> Description:        syntax error at or near "RETURNING"
> Details:
>
> This is how the table looks like:
>
> CREATE TABLE orase
> (
>  id serial NOT NULL,
>  judet_id bigint NOT NULL,
>  nume character varying(256),
>  nr_sectoare numeric(2),
>  CONSTRAINT orase_pk PRIMARY KEY (id)
> )
> WITH OIDS;
> ALTER TABLE orase OWNER TO erp;
>
> This is my code:
> INSERT INTO orase (id, nume, judet_id, nr_sectoare)
> VALUES (DEFAULT,'Medias', 34, 0)
>  RETURNING id;
>
> This is the error I get:
>
> ERROR:  syntax error at or near "RETURNING"
> LINE 3:  RETURNING id;
>         ^
>
> ********** Error **********
>
> ERROR: syntax error at or near "RETURNING"
> SQL state: 42601
> Character: 92
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Holger Rogge 2009-03-14 18:00:46 BUG #4705: Software developer
Previous Message tushar 2009-03-14 13:45:20 Re: BUG #4704: syntax error at or near "RETURNING"