Re: Function args: TEXT -vs- VARCHAR?
От | Tom Lane |
---|---|
Тема | Re: Function args: TEXT -vs- VARCHAR? |
Дата | |
Msg-id | 17777.1384365119@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Function args: TEXT -vs- VARCHAR? (David Johnston <polobo@yahoo.com>) |
Ответы |
Re: Function args: TEXT -vs- VARCHAR?
Re: Function args: TEXT -vs- VARCHAR? |
Список | pgsql-sql |
David Johnston <polobo@yahoo.com> writes: > Tom Lane-2 wrote >> skinner@.co (Craig R. Skinner) writes: >>> An explicit table of datatype & what's "silently swallowed" would be >>> valuable to clarify this topic that's said to be often repeatedly asked. >> Can't be asked that often, as that text has been untouched for more >> than a dozen years ... > s/some/parenthetical/ ? [ thinks for a bit ] Actually, the existing text is wrong/misleading in another way, since it implies that a PL implementation *could* enforce parameter typmods if it wanted. It can't, because the information isn't even stored by CREATE FUNCTION. So we do need to do something about this text. Perhaps something like this: The full SQL type syntax is allowed for declaring a function's arguments and return value. However, parenthesized type modifiers (e.g., the precision field for type numeric) are discarded by CREATE FUNCTION. Thus for example "CREATE FUNCTION foo (varchar(10)) ..." is exactly the same as "CREATE FUNCTION foo (varchar) ...". regards, tom lane
В списке pgsql-sql по дате отправления: