2009/8/9 Alvaro Herrera <alvhe...@commandprompt.com>:
> Jeff Davis escribió:
>> On Mon, 2009-04-20 at 18:53 +0200, Pavel Stehule wrote:
>> > b) it allows constructors for data types (ANSI SQL)
>> >
>> > datatype(typefield1[, typefiedl2[, typefiedl3[, ...]]]) returns type
>>
>> Can you describe this case in more detail? What section of SQL are you
>> referring to?
>
> Hmm, I see them in 4.7 "user-defined types".  However what's in SQL2003
> and the 2008 draft I have is:
>
> 3.1.6.6 constructor function: A niladic SQL-invoked function of which exactly
> one is implicitly specified for every structured type. An invocation of the
> constructor function for data type T returns a value V of the most specific
> type T such that V is not null and, for every observer function O defined for
> T, the invocation O(V) returns the default value of the attribute 
> corresponding
> to O.
>
> and later:
>
> 4.7.4 Constructors
> Associated with each structured type ST is one implicitly defined constructor
> function, if and only if ST is instantiable.
> Let TN be the name of a structured type T. The signature of the constructor
> function for T is TN() and its result data type is T. The invocation TN()
> returns a value V such that V is not null and, for every attribute A of T, 
> A(V)
> returns the default value of A. The most specific type of V is T.
> For every structured type ST that is instantiable, zero or more SQL-invoked
> constructor methods can be specified.  The names of those methods shall be
> equivalent to the name of the type for which they are specified.
>

yes - it is

Thank You

> So I'm not seeing those typefields anywhere.
>
> --
> Alvaro Herrera                                http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>

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

Reply via email to