What's the meaning of system column in views

Started by Hiroshi Inoueover 23 years ago2 messages
#1Hiroshi Inoue
Inoue@tpf.co.jp

Hi all,

I see the following for a view a_view;

# select ctid, xmin, cmin, xmax, cmax, tableoid from a_view;
ctid | xmin | cmin | xmax | cmax | tableoid
------+------+------+------+------+----------
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
(8 rows)

All system columns are null and seem to have no
meaning to me.
In addition it's also annoying to me e.g.

# create view aview as select ctid, * from a_table;
ERROR: name of column "ctid" conflicts with an existing system column

If there's no objection I would remove system columns
from views and allow the second example.

regards,
Hiroshi Inoue
http://w2422.nsk.ne.jp/~inoue/

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Hiroshi Inoue (#1)
Re: What's the meaning of system column in views

Hiroshi Inoue <Inoue@tpf.co.jp> writes:

# create view aview as select ctid, * from a_table;
ERROR: name of column "ctid" conflicts with an existing system column

If there's no objection I would remove system columns
from views and allow the second example.

I seem to recall having looked at this awhile back and deciding that it
was harder than it was worth. But if you can do it I have no objection.
(It might be easier now than it was then; I think there are fewer places
now that have hardwired knowledge about system columns than before.)

regards, tom lane