Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Joe Conway <mail(at)joeconway(dot)com>, "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Date: 2006-08-02 03:14:37
Message-ID: 200608020314.k723EbQ01079@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers pgsql-patches


Should we wait for someone to actually ask for this before adding it to
the TODO list? Does it cause a crash now?

---------------------------------------------------------------------------

Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
> > Tom Lane wrote:
> >> What I'm inclined to do for 8.2 is to disallow OLD/NEW references in
> >> multi-element VALUES clauses; the feature is still tremendously useful
> >> without that.
>
> > Given the timing, this sounds like a reasonable approach. I agree that
> > the feature has lots of interesting uses -- I'd hate to see us lose
> > that. Disallowing OLD/NEW references doesn't contradict the spec in any
> > way AFAIK either.
>
> I don't think rules are in the spec at all ;-) ... so no, that's not
> a problem. My example demonstrated a pretty likely use:
>
> create rule r2 as on update to src do
> insert into log values(old.*, 'old'), (new.*, 'new');
>
> but for the moment we can tell people to work around it the way
> they always have:
>
> create rule r2 as on update to src do
> insert into log select old.*, 'old' union all new.*, 'new';
>
> or just use two separate INSERT commands in the rule.
>
> We oughta fix it later, but I don't feel ashamed to have a restriction
> like this in the first cut.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Joe Conway 2006-08-02 03:47:42 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Previous Message Tom Lane 2006-08-02 02:52:00 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES] 8.2 features?)

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-02 03:26:59 Re: User-defined typle similar to char(length) varchar(length)
Previous Message Joshua D. Drake 2006-08-02 03:03:35 Re: Replication Documentation

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2006-08-02 03:47:42 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Previous Message Joshua D. Drake 2006-08-02 03:03:35 Re: Replication Documentation