From: | Marcin Krawczyk <jankes(dot)mk(at)gmail(dot)com> |
---|---|
To: | Ian Lawrence Barwick <barwick(at)gmail(dot)com> |
Cc: | "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: tab delimiter in output |
Date: | 2013-11-25 12:00:01 |
Message-ID: | CABnqL323mnF0UAUo2zw=PSvcF8Z4y_U9bupGsKP0Z7-SKBR51Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Thanks, but it didn't change the output.
2013/11/25 Ian Lawrence Barwick <barwick(at)gmail(dot)com>
> 2013/11/25 Marcin Krawczyk <jankes(dot)mk(at)gmail(dot)com>:
> > Hi,
> >
> > I need to return concatenated columns separated by tab character and I
> can't
> > get it to work. Here's what I tried:
> >
> > SELECT concat('aa', '\t', 'bb');
> > SELECT concat('aa', CHR(9), 'bb');
> > SELECT 'aa' || CHR(9) || 'bb';
> > SELECT 'aa' || '\t' || 'bb';
> >
> > I get "aabb" instead of "aa bb" in all cases. Is this a
> configuration
> > issue ?
>
> Try:
>
> SELECT 'aa' || E'\t' || 'bb';
>
>
> http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE
>
> Regards
>
> Ian Barwick
>
From | Date | Subject | |
---|---|---|---|
Next Message | Marcin Krawczyk | 2013-11-25 12:01:30 | Re: tab delimiter in output |
Previous Message | Thomas Kellerer | 2013-11-25 11:42:46 | Re: tab delimiter in output |