Re: anonymous composite types - how to pass tupdesc to the function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: anonymous composite types - how to pass tupdesc to the function
Дата
Msg-id 1911.1030389064@sss.pgh.pa.us
обсуждение исходный текст
Ответ на anonymous composite types - how to pass tupdesc to the function  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> I'm trying to come up with the best method to pass the query string 
> columndef, or better yet the tuple description, to the function. Any 
> suggestions on an approach?

Can't it get it for itself from the results of the query, ie, look at
PQftype() and so on to build a tupledesc?

I guess there are some gotchas with inconsistent type OIDs between
remote and local databases, but that still seems much less of a risk
than manual errors in giving the columnset definition.  You could at
least check that PQfsize matches the local type's typlen as a way of
detecting chance collisions of user-defined type OIDs.
        regards, tom lane


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: @(#)Mordred Labs advisory 0x0007: Remove DoS in PostgreSQL
Следующее
От: Joe Conway
Дата:
Сообщение: Re: anonymous composite types - how to pass tupdesc to