pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliveiros d'Azevedo Cristina <oliveiros.cristina@marktest.pt>
To: Nikolay <wheelly@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Mysterious column "name"
Date: Tue, 9 Aug 2011 16:34:26 +0100
Message-ID: <80B8AE0F6EA345ECB04802EB381EF1B1@marktestcr.marktest.pt> (raw)
References: <4E3AB1B2.5040704@gmail.com>

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@gmail.com>
To: <pgsql-sql@postgresql.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@126.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql



view thread (4+ messages)  latest in thread

Message-ID: <80B8AE0F6EA345ECB04802EB381EF1B1@marktestcr.marktest.pt>
Permalink:  ../80B8AE0F6EA345ECB04802EB381EF1B1@marktestcr.marktest.pt/
Also on:    postgresql.org/message-id/80B8AE0F6EA345ECB04802EB381EF1B1@marktestcr.marktest.pt

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: oliveiros.cristina@marktest.pt, wheelly@gmail.com
  Subject: Re: Mysterious column "name"
  In-Reply-To: <80B8AE0F6EA345ECB04802EB381EF1B1@marktestcr.marktest.pt>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox