Re: OID wraparound (was Re: pg_depend)

From: Ashley Cambrell <ash(at)freaky-namuh(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: OID wraparound (was Re: pg_depend)
Date: 2001-07-19 05:48:43
Message-ID: 3B5674BB.1080609@freaky-namuh.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>Lamar Owen <lamar(dot)owen(at)wgcr(dot)org> writes:
>
>><snip>
>>
>
><snip>
>
>Another possibility, given that any app using a feature like this is
>nonportable anyway, is to extend the INSERT statement along the lines
>that someone (maybe Larry R? I forget now) proposed before:
>
> INSERT INTO foo ... RETURNING x,y,z,...
>
>where x,y,z, etc are expressions in the variables of the inserted
>tuple(s). This could be made to look like a SELECT at the protocol
>level, which would mean that it wouldn't break client libraries or
>require a protocol bump, and it's *way* more flexible than any
>hardwired decision about what columns to return. It wouldn't have
>any problem with multiple tuples inserted by an INSERT ... SELECT,
>either.
>

This would be a good thing (tm). I use Oracle quite extensively as well
as PG and Oracle's method of "RETURNING :avalue" is very good for
returning values from newly inserted rows.

There was some talk a while back about [not?] implementing variable
binding. This seems to become very closely related to that. It would
seem to solve the problem of having a unique identifier returned for
inserts. I'm sure it would please quite a few people in the process,
especially ones moving across from Oracle. (kill two birds with one stone)

>
>
regards, tom lane
>

Ashley Cambrell

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2001-07-19 06:20:45 Re: OID wraparound (was Re: pg_depend)
Previous Message Martijn van Oosterhout 2001-07-19 05:33:33 Re: RPM source files should be in CVS (was Re: psql -l)