Re: Event Triggers reduced, v1

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Event Triggers reduced, v1
Date: 2012-07-03 02:53:15
Message-ID: CA+TgmoZ87pL8bb_Urc7iFN=oiZZF0r3X=XhHRj0eKFo4Sudmow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 2, 2012 at 6:59 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> So let's try to hammer something out now. The obvious thing that
>> occurs to me is to have a column in the catalog that is a 2-D array of
>> text, with the first element of each array being something like "tag"
>> or "subtag" (i.e. event_trigger_variable) and the remaining array
>> elements being a list of legal values. That is:
>
>> WHEN thingy IN thingy IN ('item1', 'item2') AND otherthingy IN ('foo', 'bar')
>
>> would be represented as this array:
>
>> {{thingy,item1,item2},{otherthingy,foo,bar}}
>
> Um, doesn't that require nonrectangular arrays? Or is there some
> non-obvious reason why the lists of legal values will always be all the
> same length?

Doh. You're right: I keep forgetting that arrays have to be rectangular.

Any suggestions on a sensible way to represent this?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-07-03 02:56:18 Re: Patch: add conversion from pg_wchar to multibyte
Previous Message Robert Haas 2012-07-03 02:52:21 Re: Posix Shared Mem patch