Re: GSOC13 proposal - extend RETURNING syntax

From: Karol Trzcionka <karlikt(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Boszormenyi Zoltan <zb(at)cybertec(dot)at>, David Fetter <david(at)fetter(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GSOC13 proposal - extend RETURNING syntax
Date: 2013-10-04 08:42:32
Message-ID: 524E7F78.5020603@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

W dniu 04.10.2013 02:51, Robert Haas pisze:
> Do you have a link to previous discussion on the mailing list?
Sorry, most of discussion was at IRC channel.
> I'm not positive there's enough information available
> at that stage, but if p_target_rangetblentry is populated at that
> point, you should be able to make AFTER.x translate to a Var
> referencing that range table entry.
It's not enough. Even if we know "where we are", there are more issues.
The main question is: how should we pass information about "hello, I'm
specific Var, don't evaluate me like others"? We can add two fields to
Var structure (flag - normal/before/after and no. column) - however it
needs to modify copyObject for Vars (at now it's done e.g. in
flatten_join_alias_vars_mutator for varoattno and varnoold). If
copyObject is modified, sure code in
flatten_join_alias_vars_mutator/pullup_replace_vars_callback will be
useless. I don't know if modifying pg at the low-level (changing
structure of Var and behaviour of copyObject) is good idea. Yes if the
community really want it but it needs more "votes". There is "medium"
solution: changing Var structure and do the "copy" like now (in mutator
and callback) but w/o the condition statement (for the new fields). I
think it might need to modify more places in code because of "comparing"
vars (maybe we'd need to include new fields while comparision).
Regards,
Karol Trzcionka

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2013-10-04 09:04:04 Re: GSOC13 proposal - extend RETURNING syntax
Previous Message Heikki Linnakangas 2013-10-04 08:28:43 Re: GIN improvements part 1: additional information