Search Postgresql Archives

Re: Procedure for feature requests?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sam Mason <sam@xxxxxxxxxxxxx> writes:
> On Sat, Oct 03, 2009 at 12:48:57PM -0400, Tom Lane wrote:
>> I think the reason CREATE CAST exists is exactly that the cast mechanism
>> *isn't* intended to provide conversions between any arbitrary pair of
>> datatypes.  It's only intended to provide conversions in those cases
>> where the conversion semantics are obvious to some degree or other.

> Yup, but the decision to officially bless some code as being a cast
> rather than "just" a function seems very arbitrary, I think this is why
> I don't understand its purpose.

It's useful when the conversion semantics are sufficiently natural that
you want the conversion to be applied implicitly.  I agree that the
explicit CAST syntax hasn't got very much to recommend it over a
function call.  That part you can blame on the SQL committee ;-) ...
the historical PostQUEL syntax for this was exactly a function call,
and you can still write it that way if you choose.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux