Re: Event Triggers reduced, v1

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Dimitri Fontaine <dimitri@2ndquadrant.fr>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2012-07-03T03:25:12Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Replace int2/int4 in C code with int16/int32

Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Jul 2, 2012 at 6:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Um, doesn't that require nonrectangular arrays?

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

> Any suggestions on a sensible way to represent this?

Are there likely to be enough entries that storage efficiency actually
matters?  If not, we could use a 2xN array of {key,allowed_value} pairs,
that is

{{thingy,item1},{thingy,item2},{otherthingy,foo},{otherthingy,bar}}

Or perhaps push these out into a separate table, along the lines
of
	oid	key	allowed_value
and use an oidvector to list the selected values in a trigger entry?

			regards, tom lane