copy limited number of records

From: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
To: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>
Cc: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, pgsql-general(at)postgresql(dot)org
Subject: copy limited number of records
Date: 2002-11-04 15:22:16
Message-ID: 15814.37032.424820.311658@kelvin.csl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Howabout using SELECT INTO ... LIMIT ... to select into a temporary
table and then run COPY on it?

Lee.

Johnson, Shaunn writes:
> Running PostgreSQL 7.2.1 on RedHat Linux 7.2.
>
> I'm using copy to create a bunch of flat files with delimiters
> and it's going okay. I've been asked, however, that the clients
> don't actually want ALL of the data in the table; perhaps about
> 100 or so records for testing.
>
> Is there a way to use limit while using the \copy command?
> (e.g., \copy t_test_tbl to '/usr/local/home/admin/dev_tbls' using delimiters
> ',' limit 10)
>
> I know the above doesn't work, but, perhaps there is a work around?
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Danil Kovtunovich 2002-11-04 15:33:32 ANN: EMS PostgreSQL Manager released!
Previous Message Johnson, Shaunn 2002-11-04 15:02:02 copy limited number of records