libpq usage question - Mailing list pgsql-hackers

From Joe Conway
Subject libpq usage question
Date
Msg-id 3C912997.4060001@joeconway.com
Whole thread Raw
List pgsql-hackers
I'm working on an update to contrib/dblink which would allow 
INSERT/UPDATE/DELETE statements in addition to SELECT statements against 
a remote database.

In the current version, only SELECT is possible because the SQL 
statement passed to the function gets "DECLARE mycursor CURSOR FOR " 
appended to the front of it, and the result set is obtained with "res = 
PQexec(conn, "FETCH ALL in mycursor");".

My question is, what is the downside (if any) of eliminating the use of 
a cursor in this context? I have locally made the changes, and don't see 
any negative impact. I'd appreciate any thoughts.

Thanks,

Joe



pgsql-hackers by date:

Previous
From: Ian Barwick
Date:
Subject: Re: psql and output from \?
Next
From: Larry Rosenman
Date:
Subject: Re: [SQL] [ADMIN] Syslog