Re: pgadmin string data output...

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: pgadmin string data output...
Дата
Msg-id 1316806092.2049.8.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: pgadmin string data output...  (boris <boris@localhost.localdomain>)
Список 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



В списке pgadmin-support по дате отправления:

Предыдущее
От: Steve Erickson
Дата:
Сообщение: Dropping a type
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Crash on delete record with filter in place