From: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
---|---|
To: | Oliveiros d'Azevedo Cristina <oliveiros(dot)cristina(at)marktest(dot)pt> |
Cc: | Nikolay <wheelly(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Mysterious column "name" |
Date: | 2011-08-09 16:00:52 |
Message-ID: | 4E4159B4.2050304@pinpointresearch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On 08/09/2011 08:34 AM, Oliveiros d'Azevedo Cristina wrote:
> Strange...
>
> Tables have hidden columns but AFAIK, "name" is not one of them...
>
> http://www.postgresql.org/docs/9.0/interactive/ddl-system-columns.html
>
> ...
>
>> Good day!
>>
>> I found one strange results for sql-query.
>>
>> create table testtable (
>> f1 int,
>> f2 int
>> );
>>
>> insert into testtable(f1, f2) values(1, 100);
>>
>> select testtable.* from testtable; // it is ok
>>
>> select testtable from testtable; // it is ok
>>
>> select testtable.name from testtable; // returns strange result.
>> -----------------------------------------------------------------
>> name
>> name
>> -----------------------------------------------------------------
>> "(1,100)"
>> -----------------------------------------------------------------
>> no error message about nonexistent column.
>> Result is similar to second variant, but pgAdmin3 shows not full record.
>> ...
>
See http://www.postgresql.org/docs/9.0/static/rowtypes.html on composite
data types and scroll to section 8.15.3.
Cheers,
Steve
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-08-09 16:04:08 | Re: Mysterious column "name" |
Previous Message | Oliveiros d'Azevedo Cristina | 2011-08-09 15:34:26 | Re: Mysterious column "name" |