Re: SELECT my_table.varchar FROM my_table

Поиск
Список
Период
Сортировка
От Richard Broersma
Тема Re: SELECT my_table.varchar FROM my_table
Дата
Msg-id AANLkTimzdbG85IwDQtQhRKcNcsv2QxsVJu12fBiJUoub@mail.gmail.com
обсуждение исходный текст
Ответ на SELECT my_table.varchar FROM my_table  (Jan Strube <js@deriva.de>)
Ответы Re: SELECT my_table.varchar FROM my_table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, May 31, 2010 at 7:48 AM, Jan Strube <js@deriva.de> wrote:

> I accidentally encountered a feature in Postgres 8.3 that I couldn't find in
> the documentation while submitting a query like
>
> SELECT my_table.varchar FROM my_table
>
> which returns a concatenated string of all field values per row.
> I wonder where this is documented (and if it has something to do with
> composite types).
>
> Can anyone please explain?

I don't really know, but the result looks more like a single field
formatted as "ROW-WISE" rather than CSV.  The official way to get this
result is:

SELECT ROW( my_table.* ) FROM my_table;

http://www.postgresql.org/docs/9.0/static/sql-expressions.html#SQL-SYNTAX-ROW-CONSTRUCTORS


--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

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

Предыдущее
От: Szymon Guz
Дата:
Сообщение: Re: What Linux edition we should chose?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: What Linux edition we should chose?