From:
Steve Singer <ssinger(at)ca(dot)afilias(dot)info>
To:
Robert Haas <robertmhaas(at)gmail(dot)com>
Cc:
Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>,
Andres Freund <andres(at)anarazel(dot)de>,
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>,
PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: Event Triggers: adding information
Date:
2013-01-27 17:08:33
Message-ID:
51055F11.6040208@ca.afilias.info (view raw or flat )
Thread:
2012-12-11 21:47:13 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-12-12 21:47:23 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-12-21 14:48:22 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-12-21 16:35:52 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-12-23 22:09:14 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-12-25 15:34:09 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-12-27 16:22:36 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-12-29 12:48:36 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-12-29 13:41:48 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-12-29 14:47:26 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-12-29 16:29:49 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-12-25 18:42:24 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-12-29 13:11:00 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-12-29 14:02:41 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-04 20:52:51 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-01-04 20:57:16 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-01-04 21:49:52 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-09 16:58:29 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-01-16 13:51:42 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-16 21:16:03 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-16 21:59:47 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-17 10:18:38 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-17 16:15:24 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-17 16:31:51 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-01-17 17:06:50 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-17 20:56:24 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-17 21:43:14 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-18 01:13:16 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-18 02:35:18 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-18 09:18:56 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-17 22:09:36 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-18 01:23:51 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-21 17:27:12 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-21 23:07:15 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-21 23:29:34 from "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
2013-01-22 12:02:04 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-22 12:29:26 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-23 02:55:14 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-23 09:57:52 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-23 14:33:58 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-23 19:36:18 from Bruce Momjian <bruce(at)momjian(dot)us>
2013-01-23 20:02:24 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-23 20:04:43 from Bruce Momjian <bruce(at)momjian(dot)us>
2013-01-24 10:51:12 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-25 15:04:19 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-22 12:56:02 from Thom Brown <thom(at)linux(dot)com>
2013-01-22 13:28:54 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-22 13:37:21 from Thom Brown <thom(at)linux(dot)com>
2013-01-22 14:45:40 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-22 14:47:28 from Thom Brown <thom(at)linux(dot)com>
2013-01-22 16:28:07 from Thom Brown <thom(at)linux(dot)com>
2013-01-22 16:38:37 from Thom Brown <thom(at)linux(dot)com>
2013-01-22 16:54:43 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-23 03:02:42 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-23 03:23:48 from Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
2013-01-23 03:37:57 from Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
2013-01-22 16:53:07 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-23 03:01:43 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-24 09:35:41 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-23 04:17:27 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-24 10:43:48 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-25 01:58:10 from Steve Singer <ssinger(at)ca(dot)afilias(dot)info>
2013-01-25 15:42:24 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-25 16:58:07 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-25 18:06:00 from Christopher Browne <cbbrowne(at)gmail(dot)com>
2013-01-27 04:11:42 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-27 17:08:33 from Steve Singer <ssinger(at)ca(dot)afilias(dot)info>
2013-01-27 17:20:18 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-27 17:57:11 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-27 19:08:47 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-27 20:51:54 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-28 23:07:32 from Christopher Browne <cbbrowne(at)gmail(dot)com>
2013-01-28 23:19:07 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-29 17:04:11 from Christopher Browne <cbbrowne(at)gmail(dot)com>
2013-01-29 22:51:57 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-17 19:44:12 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2013-01-17 20:24:38 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-17 21:51:03 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-17 22:35:51 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-17 22:48:23 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-17 23:22:10 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-18 01:33:34 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-01-18 02:31:28 from Craig Ringer <craig(at)2ndQuadrant(dot)com>
2013-01-18 02:34:37 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-01-18 02:36:04 from Craig Ringer <craig(at)2ndQuadrant(dot)com>
2013-01-18 02:48:01 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-18 03:01:25 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-01-18 03:14:04 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-18 15:01:48 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2013-01-18 03:39:18 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-18 14:07:21 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-01-18 14:58:53 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-18 15:47:32 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-01-18 16:42:47 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-18 17:08:57 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-01-18 17:44:13 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-18 18:03:26 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-01-18 18:22:55 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-01-18 18:26:51 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-01-18 18:59:17 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-18 21:41:31 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-18 22:12:49 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-18 22:20:51 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-22 21:15:00 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-01-17 22:08:30 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2013-01-17 22:47:27 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-18 02:27:36 from Craig Ringer <craig(at)2ndQuadrant(dot)com>
2013-01-16 23:14:41 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-16 23:42:33 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-12-30 04:13:47 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2012-12-30 12:18:32 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-12-31 05:15:38 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2012-12-21 21:30:46 from Andres Freund <andres(at)2ndquadrant(dot)com>
2012-12-27 18:42:12 from Simon Riggs <simon(at)2ndquadrant(dot)com>
Lists:
pgsql-hackers
On 13-01-26 11:11 PM, Robert Haas wrote:
> On Fri, Jan 25, 2013 at 11:58 AM, Dimitri Fontaine
> <dimitri(at)2ndquadrant(dot)fr> wrote:
>> My understanding is that if the command string we give to event triggers
>> is ambiguous (sub-object names, schema qualifications, etc), it comes
>> useless for logical replication use. I'll leave it to the consumers of
>> that to speak up now.
>
> Yeah, that's probably true. I think it might be useful for other
> purposes, but I think we need a bunch of infrastructure we don't have
> yet to make logical replication of DDL a reality.
>
I agree. Does anyone have a specific use case other than DDL
replication where an ambiguous command string would be useful? Even for
use cases like automatically removing a table from replication when it
is dropped, I would want to be able to determine which table is being
dropped unambiguously. Could I determine that from an oid? I suspect so,
but parsing a command string and then trying to figure out the table
from the search_path doesn't sound very appealing.
> Well, the point is that if you have a function that maps a parse tree
> onto an object name, any API or ABI changes can be reflected in an
> updated definition for that function. So suppose I have the command
> "CREATE TABLE public.foo (a int)". And we have a call
> pg_target_object_namespace(), which will return "public" given the
> parse tree for the foregoing command. And we have a call
> pg_target_object_name(), which will return "foo". We can whack around
> the underlying parse tree representation all we want and still not
> break anything - because any imaginable parse tree representation will
> allow the object name and object namespace to be extracted. Were that
> not possible it could scarcely be called a parse tree any longer.
How do you get the fully qualified type of the first column?
col1=pg_target_get_column(x, 0)
pg_target_get_type(col1);
or something similar.
I think that could work but we would be adding a lot of API functions to
get all the various bits of info one would want the API to expose. I
also suspect executing triggers that had to make lots of function calls
to walk a tree would be much slower than an extension that could just
walk the parse-tree or some other abstract tree like structure.
Steve
In response to
Responses
pgsql-hackers by date
Next :From: Robert HaasDate: 2013-01-27 17:11:53
Subject : Re: autovacuum not prioritising for-wraparound tables
Previous :From : Robert HaasDate : 2013-01-27 17:04:34
Subject : Re: Enabling Checksums