Re: better way - Mailing list pgsql-admin

From Mark R. Dingee
Subject Re: better way
Date
Msg-id 200505271511.35894.mark.dingee@cox.net
Whole thread Raw
In response to better way  (Lori <lorid@dri.edu>)
List pgsql-admin
if your output is from a query do

insert into mytable(col1, col2, col3)
    (select col_a, col_b, col_c from othertable);

or

use the copy command

ex.
copy mytable from 'filepath/filename' using delimiters '\t';

you can also use stdin as the input path.

On Friday 27 May 2005 02:28 pm, Lori wrote:
> I have a bunch of insert into statements just wondering if anyone knows
> of more succinct way of doing multiple
> Insert Into mytable(col1,col2,co3 etc) values ('one','two','three');
> without repeating the Insert Into ?
> thanks
> Lori
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

pgsql-admin by date:

Previous
From: Lori
Date:
Subject: better way
Next
From: David Pratt
Date:
Subject: Adding Serial Type