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

From: Michael Krüger <michael(at)kruegers(dot)email>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: 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-03 09:32:28
Message-ID: AA1EBC9D-74F0-4AA6-8035-692A010A17EB@kruegers.email
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear all,

I need to find out the Oid of a custom type in C programming language. This type is defined in a schema, outside of the standard search path, e.g. public.
I know that I can call TypenameGetTypid to find out an Oid. But this is not working for me if the type is not in the public namespace.
How can I query a non-public Oid? Do I have to change the search path? If yes how do I do it? As mentioned I need to do this with the C interface.

Regards,
Michael

Email: michael(at)kruegers(dot)email

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2020-12-03 10:01:42 Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path
Previous Message charles meng 2020-12-03 06:53:35 Alter the column data type of the large data volume table.