Re: how to insert row with specific oid - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: how to insert row with specific oid
Date
Msg-id 171a2765d49779b4ad73fc58c6a3f35acd343d04.camel@cybertec.at
Whole thread Raw
In response to how to insert row with specific oid  (ZongtianHou <zongtianhou@icloud.com>)
Responses Re: how to insert row with specific oid
List pgsql-admin
On Fri, 2020-06-19 at 15:02 +0800, ZongtianHou wrote:
> Could I insert a row to table with specific row oid. just like insert
> into tbl values (xx,xx) oid=xx? Is there some syntax to do this?

No, you cannot determine the OID that will be inserted.

Using tables WITH OIDS is deprecated, and the feature is gone in v12.

If you want to insert specific values, you shouldn't be using a
system-generated OID but a regular column of type "bigint" or so.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-admin by date:

Previous
From: ZongtianHou
Date:
Subject: how to insert row with specific oid
Next
From: ZongtianHou
Date:
Subject: Re: how to insert row with specific oid