Re: to_typemod(type_name) information function

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Sophie Herold <sophie_h(at)hemio(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: to_typemod(type_name) information function
Date: 2017-11-21 17:28:03
Message-ID: 20171121172803.GJ4628@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greeting, Sophie!

* Sophie Herold (sophie_h(at)hemio(dot)de) wrote:
> I did not find any advice on how to choose a new OID for pg_proc.

(Haven't looked at the patch itself yet really, but wanted to answer
this.)

The main thing is to not duplicate the OID, which you can avoid by
calling 'unused_oids' in src/include/catalog. That will then return a
list of OIDs that haven't been used yet. Generally speaking, for a case
where you only need one OID, grabbing one from any of the blocks listed
is fine, though it doesn't hurt to check and see what the nearby used
OIDs were for and if there might be some reason to keep a particular OID
free for future use (just for grouping convenience with other related
things).

Generally though, it's not something you have to worry about too much,
just try to avoid duplicating them. Even then, if you do, most likely
the committer who picks the patch up will realize it and adjust
accordingly.

Thanks!

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2017-11-21 17:47:49 Re: [HACKERS] Custom compression methods
Previous Message Sophie Herold 2017-11-21 17:23:43 Re: to_typemod(type_name) information function