Re: minor patch submission: CREATE CAST ... AS EXPLICIT - Mailing list pgsql-hackers

From Tom Lane
Subject Re: minor patch submission: CREATE CAST ... AS EXPLICIT
Date
Msg-id 1642.1305992322@sss.pgh.pa.us
Whole thread Raw
In response to minor patch submission: CREATE CAST ... AS EXPLICIT  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: minor patch submission: CREATE CAST ... AS EXPLICIT  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.fr> writes:
> Description:
> Add "AS EXPLICIT" to "CREATE CAST"
> This gives a name to the default case of "CREATE CAST", which creates a 
> cast which must be explicitely invoked.

I'm not sure this is a good idea.  The CREATE CAST syntax is in the SQL
standard, and this isn't it.  Now I realize that we've extended that
statement already to cover some functionality that's not in the
standard, but that doesn't mean we should create unnecessarily
nonstandard syntax for cases that are in the standard.  If a commercial
vendor did that, wouldn't you castigate them for trying to create vendor
lock-in?

> From a language definition perspective, it is helpful to have a name for 
> every case instead of an implicit fallback, without any word to describe 
> it. See for instance "CREATE USER CREATEDB/NOCREATEDB" or "CREATE RULE ... 
> DO ALSO/INSTEAD" for similar occurences of naming default cases.

If we were working in a green field, I couldn't fault this logic ... but
we are not.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: minor patch submission: CREATE CAST ... AS EXPLICIT
Next
From: Josh Kupershmidt
Date:
Subject: Re: Review: psql include file using relative path