Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Michael Krüger <michael(at)kruegers(dot)email>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path
Date: 2020-12-04 05:46:38
Message-ID: X8nNPmqSyKJHAVoJ@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Dec 03, 2020 at 01:45:05PM +0100, Pavel Stehule wrote:
> When you write C extensions for Postgres, then PostgreSQL source code is
> the best source of inspiration.

One common source of inspiration for such cases is regproc.c. For a
type, you can for example look at what to_regtype() uses for a
conversion from a name string to an OID, aka parseTypeString().
--
Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dirk Mika 2020-12-04 06:47:21 Re: Set COLLATE on a session level
Previous Message Michael Paquier 2020-12-04 05:43:00 Re: postgres-10 with FIPS