Re: Select results output to file?

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Select results output to file?
Дата
Msg-id 3E700D28.9070309@joeconway.com
обсуждение исходный текст
Ответ на Select results output to file?  (Dennis King <d_r_king@yahoo.com>)
Список pgsql-novice
Dennis King wrote:
> I want to output to a file, but haven't found anything but the SQL
> copy statement. I want to output the results of a select statement,
> though. Ideally I'd be doing this from inside a pl/pgsql function.

You can't do that from a plpgsql function short of writing your own C
function and calling it from there. You probably can write to a output
file from plperlu or pltclu; see:
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/plperl-trusted.html
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/pltcl.html

You can also use psql either in batch mode or interactively; see:
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/app-psql.html

Joe





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

Предыдущее
От: Dennis King
Дата:
Сообщение: Select results output to file?
Следующее
От: "jenner viloria"
Дата:
Сообщение: client