Re: Redirecting output from a SELECT command
| От | Andreas Kretschmer |
|---|---|
| Тема | Re: Redirecting output from a SELECT command |
| Дата | |
| Msg-id | 20101111184212.GA18518@tux обсуждение исходный текст |
| Ответ на | Redirecting output from a SELECT command (peter@vfemail.net) |
| Ответы |
Re: Redirecting output from a SELECT command
|
| Список | pgsql-novice |
peter@vfemail.net <peter@vfemail.net> wrote: > > >From a shell prompt in FreeBSD, I can use a command like: > > cat file.txt | mail email@domain.com > > to e-mail the contents of a file somewhere. > > Is it possible from a PostgreSQL pgsql> shell prompt to e-mail the results of a: > > select * from table; > > command somewhere? Sure. psql db_name -c "select * from table" | mail email@domain.com Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
В списке pgsql-novice по дате отправления: