- Forum
- Main PGNP Forum
- SQL Server/DTS/SSIS/Linked servers/Replication
- Insert Into failing with Serial Column
Insert Into failing with Serial Column
- floppycow
- Topic Author
- Visitor
-
11 years 7 months ago #757
by floppycow
Insert Into failing with Serial Column was created by floppycow
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:Error Output:I have tried several variations with the Extended Attributes: SQLSYNTAX.
Tom
Thomas Burl
SQL Statement:
INSERT INTO [PGSample].[ittest2].[public].[testtable]
([firstname],[lastname])
VALUES
('Thomas','James')
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]".
Tom
Thomas Burl
Please Log in or Create an account to join the conversation.
11 years 7 months ago #758
by Moderator
Replied by Moderator on 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.
- Forum
- Main PGNP Forum
- SQL Server/DTS/SSIS/Linked servers/Replication
- Insert Into failing with Serial Column
Time to create page: 0.054 seconds
- You are here:
-
Home
-
Forum
-
Main PGNP Forum
-
SQL Server/DTS/SSIS/Linked servers/Replication
- Insert Into failing with Serial Column