From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Ken Johanson <pg-user(at)kensystem(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: RETURNING clause: how to specifiy column indexes? |
Date: | 2007-12-12 06:45:09 |
Message-ID: | Pine.BSO.4.64.0712120138360.1768@leary.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-jdbc |
On Wed, 12 Dec 2007, Tom Lane wrote:
> Every few weeks we get a complaint from someone who thinks that it
> should be easy to rearrange the logical order of table columns.
> If that comes to pass, it would be a seriously bad idea to have
> encouraged applications to rely on table column numbers.
I think the expectation is that:
CREATE TABLE t(a int, b int);
INSERT INTO t(b,a) VALUES (1,2) RETURNING *;
will return 1,2 instead of 2,1 as it does now. In this case the op is
not expecting that the (potentially reorganized) table order is
driving the results, but the order that they've actually specified the
columns in creates the result.
Kris Jurka
From | Date | Subject | |
---|---|---|---|
Next Message | luca.ciciriello | 2007-12-12 06:51:38 | Re: POSIX and libpq |
Previous Message | Trevor Talbot | 2007-12-12 06:41:14 | Re: Hijack! |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-12-12 07:01:03 | Re: RETURNING clause: how to specifiy column indexes? |
Previous Message | Tom Lane | 2007-12-12 06:07:24 | Re: RETURNING clause: how to specifiy column indexes? |