Reputation: 10703
The error message is kinda vague... The query below works on one server, but fails on another:
INSERT INTO searches (status, uid, datecreated, searchname, options)
VALUES (0, 1, NOW(), 'TEST', '16') RETURNING sid;
And I get this error:
Query failed: ERROR: syntax error at or near "RETURNING"
Am I missing something here?
Upvotes: 0
Views: 415
Reputation: 25188
Query certainly looks right - assuming the field sid does exist (I take it it's a SERIAL field).
Are you sure you're using a PostgreSQL version that has support for RETURNING? You need version 8.2 or newer for this.
Upvotes: 2