Re: Re: postgres TODO

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: XosÉ Vázquez <xose(at)wanadoo(dot)es>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Re: postgres TODO
Date: 2001-01-19 04:07:04
Message-ID: 200101190407.XAA09960@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Restated in TODO:

* Allow [INSERT/UPDATE] ... RETURNING new.col or old.col (Philip)

> At 09:14 8/07/00 -0400, Bruce Momjian wrote:
> >> hi,
> >>
> >> threre are a postgresql/mysql comparative.
> >> You can get something for the TODO:
> >>
> >> http://www.phpbuilder.com/columns/tim20000705.php3?page=1
> >>
> >> regards,
> >>
> >
> >Thanks. Yes, I have added to the TODO list:
> >
> > * Add function to return primary key value on INSERT
>
> I had a look at the page and could not see the reference, so this
> suggestion may be inappropriate, but...
>
> How about something more general - an incredibly useful feature of Dec/Rdb is:
>
> insert into t1(...) values(...) returning attr-list
>
> which is like performing a select directly after the insert. The same kind
> of syntax applies to updates as well, eg.
>
> update t1 set f1 = 2 where <stuff> returning f1, f2, f3;
>
> Perhaps your original suggestion is a lot easier, but this is a convenient
> feature...
>
>
>
> ----------------------------------------------------------------
> Philip Warner | __---_____
> Albatross Consulting Pty. Ltd. |----/ - \
> (A.C.N. 008 659 498) | /(@) ______---_
> Tel: (+61) 0500 83 82 81 | _________ \
> Fax: (+61) 0500 83 82 82 | ___________ |
> Http://www.rhyme.com.au | / \|
> | --________--
> PGP key available upon request, | /
> and from pgp5.ai.mit.edu:11371 |/
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Patrick Dunford 2001-01-19 04:10:22 FW: User management
Previous Message Bruce Momjian 2001-01-19 03:58:34 Re: s_lock.h cleanup