Re: Patch for 8.5, transformationHook - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Patch for 8.5, transformationHook
Date
Msg-id 162867790908092300n67de9de3h2e3cb2e84ab4b4e2@mail.gmail.com
Whole thread Raw
In response to Re: Patch for 8.5, transformationHook  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
2009/8/9 Alvaro Herrera <alvherre@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
>


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: machine-readable explain output v4
Next
From: Stefan Kaltenbrunner
Date:
Subject: Re: machine-readable explain output v4