Re: Patch for 8.5, transformationHook

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Patch for 8.5, transformationHook
Date: 2009-08-10 06:00:27
Message-ID: 162867790908092300n67de9de3h2e3cb2e84ab4b4e2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/8/9 Alvaro Herrera <alvherre(at)commandprompt(dot)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
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2009-08-10 06:09:40 Re: machine-readable explain output v4
Previous Message Tom Lane 2009-08-10 05:56:47 Re: machine-readable explain output v4