Re: How to add a new pg oid?

From: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
To: jacktby jacktby <jacktby(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: How to add a new pg oid?
Date: 2023-09-05 16:46:16
Message-ID: CAEze2WgGVRY7O9mZymD6_TM=7zuF2bn-q9-gNxxq0prOQ7iYwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 5 Sept 2023 at 18:13, jacktby jacktby <jacktby(at)gmail(dot)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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2023-09-05 17:06:06 Re: PATCH: document for regression test forgets libpq test
Previous Message Robert Haas 2023-09-05 16:25:28 Re: sandboxing untrusted code