From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Function args: TEXT -vs- VARCHAR? |
Date: | 2013-11-13 17:14:06 |
Message-ID: | 1384362845994-5778192.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Tom Lane-2 wrote
> skinner(at)(dot)co
> (Craig R. Skinner) writes:
>> On 2013-11-13 Wed 06:34 AM |, Adrian Klaver wrote:
>>> The full SQL type syntax is allowed for input arguments and return
>>> value. However, some details of the type specification (e.g., the
>>> precision field for type numeric) are the responsibility of the
>>> underlying function implementation and are silently swallowed (i.e.,
>>> not recognized or enforced) by the CREATE FUNCTION command.
>
>> That's rather vague..... "... some details ..."
>
> What's ignored by CREATE FUNCTION (and, indeed, pretty much the entire
> type inference mechanism) is typmod. So any parenthesized modifier for
> a type name is not considered. Usually those are length/precision
> constraints, but user-defined types might do something else with them.
>
>> 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/ ?
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Function-args-TEXT-vs-VARCHAR-tp5777968p5778192.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-11-13 17:51:59 | Re: Function args: TEXT -vs- VARCHAR? |
Previous Message | Tom Lane | 2013-11-13 16:36:42 | Re: Function args: TEXT -vs- VARCHAR? |