Thread: pgadmin string data output...
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... thanks.
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? -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
On Tue, Sep 20, 2011 at 2:13 AM, Guillaume Lelarge <guillaume@lelarge.info> 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? Parentheses makes me think the OP has defined his tables with text[] or varchar[] columns instead of plain text or varchar. In that case, he would always see both parentheses and quotes. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
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)? thanks.
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