Re: [GENERAL] Get user defined type OID (PostgreSQL extension in C)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [GENERAL] Get user defined type OID (PostgreSQL extension in C)
Дата
Msg-id 8ec9ed88-ac8f-dd6e-133f-d4a9914bd66b@2ndquadrant.com
обсуждение исходный текст
Ответ на [GENERAL] Get user defined type OID (PostgreSQL extension in C)  (Fabiana Zioti <fabi_zioti@hotmail.com>)
Список pgsql-general
On 8/25/17 14:34, Fabiana Zioti wrote:
> I'm developing an extension to PostgreSQL using C. I created a
> user-defined type called geo_trajc_elem. I also created a function to
> generate an array of this new type.

> In this case, it is not possible to use get_fn_expr_argtype because I am
> not passing the new type as argument but creating it in the function
> itself, correct ?

The array type for a base type is automatically created by CREATE TYPE.
So the type is already there.

What you are (possibly) doing is constructing a value of that array
type.  But then the OIDs of all the types involved don't change, and you
can use the standard functions to look up the types of your arguments
and the associated array types.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [GENERAL] Invalid magic number 0000 in log file
Следующее
От: "Zhu, Joshua"
Дата:
Сообщение: [GENERAL] BDR replication port