Skip to content

Instantly share code, notes, and snippets.

@jimathyp
Last active August 3, 2021 22:17
Show Gist options
  • Select an option

  • Save jimathyp/45074c70b60605e44d744d2a1bac572c to your computer and use it in GitHub Desktop.

Select an option

Save jimathyp/45074c70b60605e44d744d2a1bac572c to your computer and use it in GitHub Desktop.

When inserting rows into a postgres table, what do the numbers returned after the insert mean?

INSERT 0 100

https://www.postgresql.org/docs/9.3/sql-insert.html

On successful completion, an INSERT command returns a command tag of the form

INSERT oid count

The count is the number of rows inserted. If count is exactly one, and the target table has OIDs, then oid is the OID assigned to the inserted row. Otherwise oid is zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment