Re: HEAD \df doesn't show functions with no arguments

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: HEAD \df doesn't show functions with no arguments
Дата
Msg-id 3264.1112333180@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: HEAD \df doesn't show functions with no arguments  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: HEAD \df doesn't show functions with no arguments  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> What makes you think you can't call 'em from SQL?

> Yes, I guess I mean does it make sense to call them from SQL?  Their
> purpose is for internal use, no?

People have actually used them for purposes of cross-type conversion
where there's I/O compatibility but no built-in cast.  For instance
you can'tregression=# select '(1,2)'::point::text;ERROR:  cannot cast type point to text
but you canregression=# select textin(point_out('(1,2)'::point)); textin -------- (1,2)(1 row)
Before you look down your nose at that, consider it's *exactly* what
plpgsql does whenever it needs to do a type conversion.

I think this decision was taken many years ago when indeed you couldn't
use the things from SQL, but it's an obsolete point of view.  It's not
like the functions are typically named in a way that conflicts with
other functions.  If I do "\df int4in", what exactly do you think I'm
looking for, and why should psql not show it to me?
        regards, tom lane


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

Предыдущее
От: elein@varlena.com (elein)
Дата:
Сообщение: Re: HEAD \df doesn't show functions with no arguments
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: HEAD \df doesn't show functions with no arguments