Re: pgadmin string data output...

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: boris <boris(at)localhost(dot)localdomain>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: pgadmin string data output...
Date: 2011-09-23 19:28:11
Message-ID: 1316806092.2049.8.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Tue, 2011-09-20 at 07:24 -0400, boris wrote:
> On 09/20/2011 03:13 AM, Guillaume Lelarge wrote:
> > On Mon, 2011-09-19 at 21:27 -0400, boris wrote:
> >> hi all,
> >> I guess , this is very basic question, but I don't see any options to
> >> fix it.
> >> why when I do select , strings in "data output" are in quotes and
> >> parenthesis?
> >>
> >> How do I turn it off? I would like to see plain data...
> >>
> >
> > Do you mean when you copy and paste the result? in that case, each
> > columns' value could be between quotes. But the parenthesis, I have no
> > idea.
> >
> > So, is it when you copy and paste the results? or is it in the results
> > grid?
> >
> >
> it's in the results grid.
> data looks like:
>
> (aaaa)
> (bbb)
> ("aaa bbb")
> ("aaa ccc")
> ...
>
> In the morning I found the reason right away :-)
>
> CREATE TABLE "temp".test1
> (
> word character varying(255) NOT NULL,
> CONSTRAINT test1_pkey PRIMARY KEY (word)
> )
> WITH (
> OIDS=FALSE
> );
>
> I was making this select:
> select lower(w.name) from temp.test1 w
>
> w.name should be w.word, of course... Now it shows data without parenthesis.
>
> so, can anyone tell me what has been called in this case (w.name)?
>

I don't remember the exact explanation, but using "name" brings you the
whole row in a single column. For example, add a column and you'll get
this:

b1=# select * from temp.test1;
word | word2
------+-------
a | b
(1 row)

b1=# select lower(w.name) from temp.test1 w;
lower
-------
(a,b)
(1 row)

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2011-09-23 20:04:35 Re: Crash on delete record with filter in place
Previous Message Steve Erickson 2011-09-21 14:04:21 Dropping a type