Re: to_typemod(type_name) information function - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: to_typemod(type_name) information function
Date
Msg-id 20171121172803.GJ4628@tamriel.snowman.net
Whole thread Raw
In response to Re: to_typemod(type_name) information function  (Sophie Herold <sophie_h@hemio.de>)
List pgsql-hackers
Greeting, Sophie!

* Sophie Herold (sophie_h@hemio.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

pgsql-hackers by date:

Previous
From: Sophie Herold
Date:
Subject: Re: to_typemod(type_name) information function
Next
From: Tomas Vondra
Date:
Subject: Re: [HACKERS] Custom compression methods