pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Michael Krüger <michael@kruegers.email>
Cc: Postgres General <pgsql-general@postgresql.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: Fri, 4 Dec 2020 14:46:38 +0900
Message-ID: <X8nNPmqSyKJHAVoJ@paquier.xyz> (raw)
In-Reply-To: <CAFj8pRAKW+gHuiXwyeuQ3HgT87Ndj6bM+yH2UnwNxX8-P_4B6A@mail.gmail.com>
References: <AA1EBC9D-74F0-4AA6-8035-692A010A17EB@kruegers.email>
	<CAFj8pRDH0g2JT9g457PVi7+wd=-YqktzWBcvKeen6cu5m5VQwQ@mail.gmail.com>
	<32816FAC-CF61-45E0-B161-7DA662F3FEDF@kruegers.email>
	<CAFj8pRAKW+gHuiXwyeuQ3HgT87Ndj6bM+yH2UnwNxX8-P_4B6A@mail.gmail.com>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (5+ messages)

Message-ID: <X8nNPmqSyKJHAVoJ@paquier.xyz>
Permalink:  ../X8nNPmqSyKJHAVoJ@paquier.xyz/
Also on:    postgresql.org/message-id/X8nNPmqSyKJHAVoJ@paquier.xyz

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: michael@paquier.xyz, pavel.stehule@gmail.com, michael@kruegers.email
  Subject: Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path
  In-Reply-To: <X8nNPmqSyKJHAVoJ@paquier.xyz>
  References: <AA1EBC9D-74F0-4AA6-8035-692A010A17EB@kruegers.email> <CAFj8pRDH0g2JT9g457PVi7+wd=-YqktzWBcvKeen6cu5m5VQwQ@mail.gmail.com> <32816FAC-CF61-45E0-B161-7DA662F3FEDF@kruegers.email> <CAFj8pRAKW+gHuiXwyeuQ3HgT87Ndj6bM+yH2UnwNxX8-P_4B6A@mail.gmail.com> <X8nNPmqSyKJHAVoJ@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox