pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark R. Dingee <mark.dingee@cox.net>
To: Lori <lorid@dri.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: better way
Date: Fri, 27 May 2005 15:11:35 -0400
Message-ID: <200505271511.35894.mark.dingee@cox.net> (raw)
In-Reply-To: <429766C9.70902@dri.edu>
References: <429766C9.70902@dri.edu>

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)



view thread (2+ messages)

Message-ID: <200505271511.35894.mark.dingee@cox.net>
Permalink:  ../200505271511.35894.mark.dingee@cox.net/
Also on:    postgresql.org/message-id/200505271511.35894.mark.dingee@cox.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mark.dingee@cox.net, lorid@dri.edu
  Subject: Re: better way
  In-Reply-To: <200505271511.35894.mark.dingee@cox.net>
  References: <429766C9.70902@dri.edu> <200505271511.35894.mark.dingee@cox.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox