libpq usage question
libpq usage question
От:
Joe Conway <mail@joeconway.com>
Дата:
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