| From: | "Merlin Moncure" <mmoncure(at)gmail(dot)com> |
|---|---|
| To: | "Jaime Casanova" <systemguards(at)gmail(dot)com> |
| Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: select from sequences |
| Date: | 2007-02-12 14:05:30 |
| Message-ID: | b42b73150702120605u40cf66a4t361aa5890123271@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2/11/07, Jaime Casanova <systemguards(at)gmail(dot)com> wrote:
> On 2/11/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > "Jaime Casanova" <systemguards(at)gmail(dot)com> writes:
> > > just for curiosity, why the code doesn't throw an error when using
> > > sequences in the from_list of a select?
> >
> > That's a feature, not a bug.
> >
>
> and why is this a feature? i mean, what real use it has?
I use it all the time. You can query the sequence for its last value
without using it first. This is a lot more useful than it appears on
the surface.
merlin
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Teodor Sigaev | 2007-02-12 14:14:33 | pgsql: Fix backend crash in parsing incorrect tsquery. |
| Previous Message | Zeugswetter Andreas ADI SD | 2007-02-12 11:41:30 | Re: HOT for PostgreSQL 8.3 |