Re: Function Returning SETOF RECORD: Trouble With Char Type

Поиск
Список
Период
Сортировка
От Angus B. Atkins-Trimnell
Тема Re: Function Returning SETOF RECORD: Trouble With Char Type
Дата
Msg-id 47E270C7.602@uic.edu
обсуждение исходный текст
Ответ на Re: Function Returning SETOF RECORD: Trouble With Char Type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Thanks a lot.  I missed your post when it first came up, but I just tried double-quoting the type indicator and it worked like a charm!

--Angus

Tom Lane wrote:
"Angus B. Atkins-Trimnell" <trimnell@uic.edu> writes: 
I am having trouble with a function designed to return all column 
constraints on a table.   
I think the problem is that you're declaring the contype return column
as char (ie, character(1)) when pg_constraint.contype is actually "char"
(a historical PG datatype that's really just a single byte).  The naming
confusion is unfortunate but we've never bitten the bullet to rename
"char" to something else.

Use quotes, or explicitly cast the catalog column to regular char
in the function's query.
		regards, tom lane

 

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

Предыдущее
От: "Selena Deckelmann"
Дата:
Сообщение: OSCON PostgreSQL Day July 20, 2008 - Save the date!
Следующее
От: "Zubkovsky, Sergey"
Дата:
Сообщение: Re: Row size overhead