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.constantinescu@gmail.com>:
>
> The following bug has been logged online:
>
> Bug reference: =C2=A0 =C2=A0 =C2=A04704
> Logged by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Brad Constantinescu
> Email address: =C2=A0 =C2=A0 =C2=A0brad.constantinescu@gmail.com
> PostgreSQL version: 8.1.4
> Operating system: =C2=A0 FreeBSD
> Description: =C2=A0 =C2=A0 =C2=A0 =C2=A0syntax error at or near "RETURNIN=
G"
> Details:
>
> This is how the table looks like:
>
> CREATE TABLE orase
> (
> =C2=A0id serial NOT NULL,
> =C2=A0judet_id bigint NOT NULL,
> =C2=A0nume character varying(256),
> =C2=A0nr_sectoare numeric(2),
> =C2=A0CONSTRAINT 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)
> =C2=A0RETURNING id;
>
> This is the error I get:
>
> ERROR: =C2=A0syntax error at or near "RETURNING"
> LINE 3: =C2=A0RETURNING id;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^
>
> ********** Error **********
>
> ERROR: syntax error at or near "RETURNING"
> SQL state: 42601
> Character: 92
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>