Re: Finding the correct type

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Finding the correct type
Дата
Msg-id 20060430105855.GD11912@svana.org
обсуждение исходный текст
Ответ на Finding the correct type  (Thomas Hallgren <thomas@tada.se>)
Ответы Re: Finding the correct type  (Thomas Hallgren <thomas@tada.se>)
Список pgsql-hackers
On Sun, Apr 30, 2006 at 12:50:23PM +0200, Thomas Hallgren wrote:
> I'm writing a UDT that takes a varchar argument that represents the name
> of a type. The caller may optionally qualify with a namespace, i.e.
> "pg_catalog.varchar", or "public.address". Is there a c-function
> somewhere that will return the pg_type that corresponds to the name
> (with respect to the current setting of search_path in case the name is
> unqualified)?

If you want it as a C string, something like format_type_be() would
suffice. Not it's designed for use in error messages so it makes no
particular to clean up after itself.

Another possibility is the output function for the regtype type, ie
regtypeout.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Hallgren
Дата:
Сообщение: Finding the correct type
Следующее
От: Thomas Hallgren
Дата:
Сообщение: Re: Finding the correct type