Re: How to add a new pg oid? - Mailing list pgsql-hackers

From Matthias van de Meent
Subject Re: How to add a new pg oid?
Date
Msg-id CAEze2WgGVRY7O9mZymD6_TM=7zuF2bn-q9-gNxxq0prOQ7iYwQ@mail.gmail.com
Whole thread Raw
In response to Re: How to add a new pg oid?  (jacktby jacktby <jacktby@gmail.com>)
List pgsql-hackers
On Tue, 5 Sept 2023 at 18:13, jacktby jacktby <jacktby@gmail.com> wrote:
>
> I’m trying to add a new data type for my pg. How to do that? Can you give me more details or an example?

You could get started by looking at the documentation on custom SQL
types with https://www.postgresql.org/docs/current/sql-createtype.html,
or look at the comments in pg_type.dat and the comments on TypInfo in
bootstrap.c on how the built-in types are created and managed.

Lastly, you could look at pg_class and the genbki documentation if you
want to add new catalog types.

Kind regards,

Matthias van de Meent
Neon (https://neon.tech)



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: sandboxing untrusted code
Next
From: Bruce Momjian
Date:
Subject: Re: PATCH: document for regression test forgets libpq test