| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andreas Pflug <pgadmin(at)pse-consulting(dot)de> |
| Cc: | Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Get rid of system attributes in pg_attribute? |
| Date: | 2005-02-19 17:17:03 |
| Message-ID: | 17644.1108833423@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Andreas Pflug <pgadmin(at)pse-consulting(dot)de> writes:
>>> Does anyone know of client code that actually pays attention to
>>> pg_attribute rows with negative attnums?
> Would those columns remain selectable for debugging/maintenance
> purposes, despite not appearing in system catalogs?
Certainly. They just wouldn't have entries in pg_attribute.
It occurs to me that without the explicit entries, we could stop
considering the system names to be reserved column names --- that is,
we could allow users to create ordinary columns by these names.
(The procedure for looking up a column name would be to first try in
pg_attribute, and if that failed to check an internal list of system
column names.) If you did make such a column, then you'd be unable to
get at the system column you'd masked in that particular table. I'm
unsure offhand if this would be a good thing or bad. Not having
reserved column names is certainly good, but masking a system column
is something you might regret when you need to debug. I suppose you
could always rename the conflicting column if so.
Making the system column names un-reserved would be a very good thing
from the point of view of being able to add more. I've wished for
some time that there were a system column exposing the tuple flags
(t_infomask). I've not dared to propose adding it because of the
likelihood of breaking people's table definitions, but if the name
needn't be reserved then that objection goes away.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jürgen Cappel | 2005-02-19 17:30:22 | Re: Data loss, vacuum, transaction wrap-around |
| Previous Message | Andreas Pflug | 2005-02-19 16:57:52 | Re: Get rid of system attributes in pg_attribute? |