Insert Into failing with Serial Column

More
9 years 6 months ago #757 by floppycow
floppycow created the topic: Insert Into failing with Serial Column
We are testing out the PGNP (PGNP-1.3.0.2217) from an SQL 2005 against a PostgresSQL 8.1.13. The testing is going very smoothly for the Update, Delete, and Select commands. The Insert commands work correctly when running against a table that does not have a serial column. We get the follow error when attempting to insert a record to a table that has a serial column (primary key).
SQL Statement:
INSERT INTO [PGSample].[ittest2].[public].[testtable]
           ([firstname],[lastname])
     VALUES
           ('Thomas','James')
Error Output:
OLE DB provider "PGNP" for linked server "PGSample" returned message "ERROR:  syntax error at or near "RETURNING"
LINE 1: ...testtable"("firstname","lastname") VALUES ($1,$2) RETURNING ...
                                                             ^
".
Msg 7343, Level 16, State 2, Line 1
The OLE DB provider "PGNP" for linked server "PGSample" could not INSERT INTO table "[PGSample].[ittest2].[public].[testtable]".
I have tried several variations with the Extended Attributes: SQLSYNTAX.

Tom
Thomas Burl

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #758 by Moderator
Moderator replied the topic: Re: Insert Into failing with Serial Column
The issue with RETURNING clause occurs because the syntax is available only in Postgres 8.2 and later. We can add support for previous versions of Postgres but it may take couple of weeks.

Please Log in or Create an account to join the conversation.

Time to create page: 0.105 seconds
Powered by Kunena Forum