0

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?

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.