From: | "Oliveiros d'Azevedo Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt> |
---|---|
To: | "Nikolay" <wheelly(at)gmail(dot)com>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Mysterious column "name" |
Date: | 2011-08-09 15:34:26 |
Message-ID: | 80B8AE0F6EA345ECB04802EB381EF1B1@marktestcr.marktest.pt |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
Best,
Oliveiros
----- Original Message -----
From: "Nikolay" <wheelly(at)gmail(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Sent: Thursday, August 04, 2011 3:50 PM
Subject: [SQL] Mysterious column "name"
> 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.
>
> for long table the result is truncated
> select aaaaaa."name"
> from yc_accounts aaaaaa
> -----------------------------------------------------------------
> name
> name
> -----------------------------------------------------------------
> "(1154,81,testtter,"","","","","","","","","",donald22(at)126(dot)com,""
> -----------------------------------------------------------------
>
> The same results on two servers.
> PostgreSQL 9.0.4 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real
> (Debian 4.4.5-8) 4.4.5, 64-bit
>
> PostgreSQL 9.0.4 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.5.real
> (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 64-bit
>
> Is it a feature or a bug? I didn't found information in documentation
> about this.
>
>
> Best regards.
> Nikolay.
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Crawford | 2011-08-09 16:00:52 | Re: Mysterious column "name" |
Previous Message | Carla | 2011-08-08 19:14:01 | Re: Problem with nested left-joins and coalesce |