Re: BUG #18793: PLpgSQL Function Returning Type of Table is not match for varchar(n) data type via Return Query

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #18793: PLpgSQL Function Returning Type of Table is not match for varchar(n) data type via Return Query
Дата
Msg-id CAKFQuwaRY_x3XXnhpi3Q6NcUAsW9aMRAcEwRtxb8kDDjk1fKvA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Ynt: BUG #18793: PLpgSQL Function Returning Type of Table is not match for varchar(n) data type via Return Query  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Sunday, February 9, 2025, Tom Lane <tgl@sss.pgh.pa.us> wrote:
 
You could however make a reasonable case that we should not accept
"varchar(200)" in contexts where we're going to ignore the "(200)"
part.  That's pretty ancient too, cf this comment in gram.y:

 * We can catch over-specified arguments here if we want to,
 * but for now better to silently swallow typmod, etc.
 * - thomas 2000-03-22

I'm not sure whether rejecting such things would make more people
happy than it made unhappy.

Given that pg_dump already outputs the typmod-less code I’d have to suspect that making specifying a typmod here an error would be better for our reputation, and users, overall.

David J.

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