Re: How to return argument data type from sql function

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: How to return argument data type from sql function
Дата
Msg-id b6519a3e-76f3-85d5-c9aa-c79c5d119524@hot.ee
обсуждение исходный текст
Ответ на Re: How to return argument data type from sql function  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: How to return argument data type from sql function  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
> Adrian Klaver recommends in
Padding a text typed output with actual significant spaces "works"?  It is not equivalent to a bpchar with insignificant padding spaces...

You are right. I need char(n) type and this is not working.  How to use expression in cast, like

select torus(charcol) :: CHAR( ColWidth('public', 'test',  'charcol')  ) from test

This throws error in Postgres. ColWidth is immutable and called with constant arguments so it should work. How to fix postgres to allow constant ColWidth() expression in cast ?

Andrus.

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

Предыдущее
От: Andrus
Дата:
Сообщение: Re: How to return argument data type from sql function
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: How to return argument data type from sql function