strange behavior, hoping for an explanation - Mailing list pgsql-general

From Chris Travers
Subject strange behavior, hoping for an explanation
Date
Msg-id CAKt_Zfu18vu3X4+VC7ooH_v1rrB7oEqATNp5zC8AS26R6Tr6nQ@mail.gmail.com
Whole thread Raw
Responses Re: strange behavior, hoping for an explanation  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: strange behavior, hoping for an explanation  (pasman pasmański <pasman.p@gmail.com>)
Re: strange behavior, hoping for an explanation  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-general
Hi;

I have found recently that tables in certain contexts seem to have a
name pseudocolumn.  I was wondering if there is any documentation as
to what this is and what it signifies.

postgres=# CREATE table TEST2 (a text, b text);
CREATE TABLE
postgres=# INSERT INTO test2 values ('aaaa', 'bbbb');
INSERT 0 1
postgres=# select t.name FROM test2 t;
    name
-------------
 (aaaa,bbbb)
(1 row)

However:


postgres=# select name FROM test2 t;
ERROR:  column "name" does not exist
LINE 1: select name FROM test2 t;

This isn't making any sense to me.  Are there certain circumstances
where a tuple is cast to something like varchar(63)?  Does this pose
pitfals for any columns named 'name' in other contexts?

Best Wishes,
Chris Travers

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fedora 16 note...
Next
From: Tom Lane
Date:
Subject: Re: strange behavior, hoping for an explanation