Re: "RETURNING PRIMARY KEY" syntax extension

From: Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
To: Ian Barwick <ian(at)2ndquadrant(dot)com>
Cc: Jochem van Dieten <jochemd(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "RETURNING PRIMARY KEY" syntax extension
Date: 2014-06-25 06:13:26
Message-ID: CAGPqQf3zTg1dbNvLxCRn8wVdU0m5HT+rO+ap-dOeOoz-9R9wZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello All,

I assigned my self as reviewer of the patch. I gone through the
mail chain discussion and in that question has been raised about
the feature and its implementation, so would like to know what is
the current status of this project/patch.

Regards,

On Thu, Jun 12, 2014 at 5:53 PM, Ian Barwick <ian(at)2ndquadrant(dot)com> wrote:

> On 14/06/12 20:58, Jochem van Dieten wrote:
> > On Thu, Jun 12, 2014 at 12:25 PM, Ian Barwick wrote:
> >
> > On 14/06/12 18:46, Jochem van Dieten wrote:
> > > I haven't checked the code, but I am hoping it will help with the
> problem
> > > where a RETURNING * is added to a statement that is not an insert
> or update
> > > by the JDBC driver. That has been reported on the JDBC list at
> least twice,
> > > and the proposed workaround is neither very elegant nor very
> robust:
> > >
> https://groups.google.com/forum/#!msg/pgsql.interfaces.jdbc/7WY60JX3qyo/-v1fqDqLQKwJ
> >
> > Unfortunately that seems to be a JDBC-specific issue, which is
> outside
> > of the scope of this particular patch (which proposes additional
> server-side
> > syntax intended to make RETURNING * operations more efficient for
> > certain use cases, but which is in itself not a JDBC change).
> >
> >
> > But the obvious way to fix the JDBC issue is not to fix it by adding a
> 'mini parser' on
> > the JDBC side, but to make SELECT ... RETURNING PRIMARY KEY a regular
> select that silently
> > ignores the returning clause and doesn't throw an error on the
> server-side.
> >
> > That might still be outside the scope of this particular patch, but it
> would provide
> > (additional) justification if it were supported.
>
> That would be adding superfluous, unused and unusable syntax of no
> potential value
> (there is no SELECT ... RETURNING and it wouldn't make any sense if there
> was) as a
> workaround for a driver issue - not going to happen.
>
> Regards
>
> Ian Barwick
>
>
> --
> Ian Barwick http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

--
Rushabh Lathia
www.EnterpriseDB.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Barwick 2014-06-25 07:04:16 Re: "RETURNING PRIMARY KEY" syntax extension
Previous Message Abhijit Menon-Sen 2014-06-25 05:20:12 Re: PATCH: Allow empty targets in unaccent dictionary