Adi Alurkar wrote:
Greetings,
There is no direct way to achieve what you want, the easiest hack is to
create a temp table with you query i.e.
create table tmp_foo as select col1, col4, col7 from table1, table2
where ;
copy table tmp_foo to [stdout|]
HTH
I ended up using pgadmin3 -
This is kind of a pg-admin newbie question, so apologies in advance.
Anyway, I'd like to issue a command that dumps the results of a query to
a txt file in comma delimited format. Does PostgreSQL ship with
something to do this? I searched the web, but found what appeared to be
non-free solut
On Thursday 25 August 2005 3:24 pm, David Durham wrote:
> This is kind of a pg-admin newbie question, so apologies in
> advance.
>
> Anyway, I'd like to issue a command that dumps the results of a
> query to a txt file in comma delimited format. Does PostgreSQL
> ship with something to do this? I
On Thu, Aug 25, 2005 at 03:48:54PM -0700, Adi Alurkar wrote:
> Greetings,
>
> There is no direct way to achieve what you want, the easiest hack is
> to create a temp table with you query i.e.
>
> create table tmp_foo as select col1, col4, col7 from table1, table2
> where ;
> copy table t
Whoops, should have also mentioned that you want -P format=unaligned like so:
psql -P format=unaligned -F ',' snort <
David,
You're probably looking for something like this from the psql man page:
-F separator
--field-separator separator
Use separator as the field
Greetings,
There is no direct way to achieve what you want, the easiest hack is
to create a temp table with you query i.e.
create table tmp_foo as select col1, col4, col7 from table1, table2
where ;
copy table tmp_foo to [stdout|]
HTH
Adi Alurkar
[EMAIL PROTECTED]
On Aug 25, 2005,
David,
You're probably looking for something like this from the psql man page:
-F separator
--field-separator separator
Use separator as the field separator. This is equivalent to
\pset fieldsep or \f.
I would guess -F "," would do the trick.
On
This is kind of a pg-admin newbie question, so apologies in advance.
Anyway, I'd like to issue a command that dumps the results of a query to
a txt file in comma delimited format. Does PostgreSQL ship with
something to do this? I searched the web, but found what appeared to be
non-free solution