Skip site navigation (1) Skip section navigation (2)

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

From: "Brad Constantinescu" <brad(dot)constantinescu(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4704: syntax error at or near "RETURNING"
Date: 2009-03-14 12:47:48
Message-ID: 200903141247.n2EClmEJ057618@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
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

Responses

pgsql-bugs by date

Next:From: Tomasz OlszakDate: 2009-03-14 13:13:05
Subject: Bug? Problem with accesing Oracle from plperlu function?==?UTF-8?Q? when using remote pg client.
Previous:From: DGPickettDate: 2009-03-14 11:02:59
Subject: Re: Subbestions: 1) Query timeout 2) Session kill by same login

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group