diff options
-rw-r--r-- | doc/src/sgml/ref/copy.sgml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 34f1b496ebf..5461924b368 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.67 2005/09/05 14:44:05 adunstan Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.68 2005/10/13 02:00:09 momjian Exp $ PostgreSQL documentation --> @@ -709,6 +709,18 @@ COPY country FROM '/usr1/proj/bray/sql/country_data'; </para> <para> + To copy into a file just the countries whose names start with 'A' + using a temporary table which is automatically deleted: +<programlisting> +BEGIN; +CREATE TEMP TABLE a_list_COUNTRIES AS + SELECT * FROM country WHERE country_name LIKE 'A%'; +COPY a_list_countries TO '/usr1/proj/bray/sql/a_list_countries.copy'; +ROLLBACK; +</programlisting> + </para> + + <para> Here is a sample of data suitable for copying into a table from <literal>STDIN</literal>: <programlisting> |