Re: Re: [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: Re: [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc
Дата
Msg-id 20130708012834.GA1151026@tornado.leadboat.com
обсуждение исходный текст
Ответ на Re: Re: [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Sun, Jul 07, 2013 at 08:55:01PM -0400, Peter Eisentraut wrote:
> On Sun, 2013-07-07 at 20:15 -0400, Noah Misch wrote:
> > I mildly recommend we reject this patch as such, remove the TODO item,
> > remove
> > the XXX comments this patch removes, and plan not to add more trivial
> > SPI
> > wrappers.  If consensus goes otherwise, I think we should at least
> > introduce
> > SPI_getcollation() at the same time.  Code that needs to transfer one
> > of them
> > very often needs to transfer the other.  Having API coverage for just
> > one
> > makes it easier for hackers to miss that. 
> 
> The question is, what would one do with those values?  It's hard to see
> when you would need the typmod and the collation of a result set.  There
> might be cases, but enough to provide a special API for it?

Good point.  One of the ways PL/pgSQL uses it is to feed a result datum back
into a future query as a Param node.

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [PATCH] Add session_preload_libraries configuration parameter
Следующее
От: David Fetter
Дата:
Сообщение: Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]