From: Laurenz Albe <laurenz.albe@cybertec.at>
To: ZongtianHou <zongtianhou@icloud.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: how to insert row with specific oid
Date: Fri, 19 Jun 2020 09:13:09 +0200
Message-ID: <171a2765d49779b4ad73fc58c6a3f35acd343d04.camel@cybertec.at> (raw)
In-Reply-To: <99E3D554-1D96-42F0-9647-B7D2CECB3E7E@icloud.com>
References: <99E3D554-1D96-42F0-9647-B7D2CECB3E7E@icloud.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, zongtianhou@icloud.com
Subject: Re: how to insert row with specific oid
In-Reply-To: <171a2765d49779b4ad73fc58c6a3f35acd343d04.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox