On 4/23/2019 4:32 AM, Ryan Culpepper wrote:

On PostgreSQL, my guess is that your table was created without the "WITH OIDS" clause. For example:

  > (define c (dsn-connect 'pg))
  > (query c "create table words (t text)")
  (simple-result '())
  > (query c "insert into words (t) values ('hello')")
  (simple-result '((insert-id . #f) (affected-rows . 1)))

and here's a example for a table with "WITH OIDS":

  > (query c "create table names (t text) with oids")
  (simple-result '())
  > (query c "insert into names (t) values ('Alice')")
  (simple-result '((insert-id . 105197) (affected-rows . 1)))

Creating tables with OIDs in Postgresql has been discouraged for a long time.
From the manual:

The OID type is currently implemented as an unsigned four-byte integer. Therefore, it is not large enough to provide database-wide uniqueness in large databases, or even in large individual tables. So, using a user-created table's OID column as a primary key is discouraged. OIDs are best used only for references to system tables.


That passage has been the same since v7.3.  The system default setting been *default_with_oids=FALSE*  (i.e. don't add OIDs when creating tables) since version 8.something.

see: https://www.postgresql.org/docs/8.0/datatype-oid.html

George



--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to