You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a COPY command to load a csv, and want to know how many rows were added. Postgres does return this data (Postgres docs, see the Outputs section), but I can't access it via the PGlite API.
The query API Result includes a affectedRows field docs, but only for INSERT, UPDATE, and DELETE commands. (Side note: those docs could use a description of when the field is populated.)
I believe that this should be a simple addition, just adding a case to retrieveRowCount() for COPY.
My workaround for now is to make a separate SELECT count(*) query after doing the COPY.
The text was updated successfully, but these errors were encountered:
Thanks for the report, quite right thats where to add it. This would be a great first contribution for someone, it's just an additional CASE on the switch branch along with UPDATE/DELETE:
I'm using a
COPY
command to load a csv, and want to know how many rows were added. Postgres does return this data (Postgres docs, see the Outputs section), but I can't access it via the PGlite API.The query API Result includes a
affectedRows
field docs, but only forINSERT
,UPDATE
, andDELETE
commands. (Side note: those docs could use a description of when the field is populated.)I believe that this should be a simple addition, just adding a case to
retrieveRowCount()
forCOPY
.My workaround for now is to make a separate
SELECT count(*)
query after doing the COPY.The text was updated successfully, but these errors were encountered: