public inbox for [email protected]
help / color / mirror / Atom feedFrom: jacktby jacktby <[email protected]>
To: [email protected]
Subject: Re: How to add a new pg oid?
Date: Wed, 6 Sep 2023 18:50:54 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CAKFQuwbG3irGjaL4fr__5PShLRi0ndEJpkk5PrdYjjfk3pSwmg@mail.gmail.com>
<[email protected]>
> 2023年9月6日 18:19,jacktby jacktby <[email protected]> 写道:
>
>
>
>> 2023年9月6日 01:47,David G. Johnston <[email protected]> 写道:
>>
>> OIDs don't exist independently of the data they are associated with. Give more context if you want a better answer. Or just go look at the source code commits for when the last time something needing an OID got added to the core catalog.
>>
>> David J.
>>
>
> { oid => '111', array_type_oid => '6099', descr => 'similarity columns',
> typname => 'similarity_columns', typlen => '-1', typlen => '-1', typbyval => 'f', typcategory => 'U',
> typinput => 'byteain', typoutput => 'byteaout', typreceive => 'bytearecv',
> typsend => 'byteasend', typalign => 'i', typstorage => 'x' },
>
> I add above into pg_type.dat. And then I add execute “make install” and restart pg. And Then do below:
> postgres=# SELECT typname from pg_type where typname like '%similarity%';
> typname
> ---------
> (0 rows)
>
> I can’t get the type I added. What else I need to do?
I add below in bootstrap.c:
static const struct typinfo TypInfo[] = {
{"similarity_columns", SimilarityColumns, 0, -1, false, TYPALIGN_INT, TYPSTORAGE_EXTENDED, InvalidOid,
F_BYTEAIN, F_BYTEAOUT},
….
}
And then “make install” and restart pg.but still:
postgres=# SELECT typname from pg_type where typname like '%similarity%';
typname
---------
(0 rows)
Please give me help.
view thread (5+ messages)
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: How to add a new pg oid?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox