pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Georg Vollmers <Vollmers@hdi.de>
To: docs@postgresql.org
Subject: Populating a Class with Instances/Postgres Docs
Date: Wed, 20 Oct 1999 11:02:15 +0100
Message-ID: <99Oct20.120020gmt+0100.28729@hdilan.hdi.de> (raw)

Hi there,

I hope I'm using the correct address for this. If not, would you please
so kind to redirect me to the correct address, if possible?

The COPY statement in the attached query-ug2887.htm from the PostgreSQL
User's Guide is explain with a typo.
While it is written:

'COPY INTO weather FROM '/home/user/weather.txt'
    USING DELIMITERS '|';'

the correct version must be without the 'INTO':

'COPY weather FROM '/home/user/weather.txt'
    USING DELIMITERS '|';'

It took me half an hour to look for COPY with \h COPY in psql instead of
trusting the web documentation :-(

Greetings from Hannover, Germany and thanks for your work on Postgres!

Georg
--
Georg Vollmers, M.A., HDI V.a.G., Zentrale Informationsverarbeitung, 
Verfahrenstechnik, Phone +49 511 6454854 Fax +49 511 645114854
email: Vollmers@HDI.de, Georg.Vollmers@Z.HDI.de 
privat: georg@egalize.han.de

Attachments:

query-ug2887.htm (text/html, 2.4K) download <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML ><HEAD ><TITLE >Populating a Class with Instances</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet version 1.19"><LINK REL="HOME" TITLE="PostgreSQL User's Guide" HREF="user.htm"><LINK REL="UP" TITLE="The Query Language" HREF="query-ug.htm"><LINK REL="PREVIOUS" TITLE="Creating a New Class" HREF="query-ug2863.htm"><LINK REL="NEXT" TITLE="Querying a Class" HREF="query-ug2896.htm"></HEAD ><BODY BGCOLOR="#FFFFFF" TEXT="#000000" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PostgreSQL User's Guide</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="query-ug2863.htm" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 12. The Query Language</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="query-ug2896.htm" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 CLASS="SECT1" ><A NAME="AEN2887" >Populating a Class with Instances</A ></H1 ><P > The <B CLASS="COMMAND" >insert</B > statement is used to populate a class with instances: <PRE CLASS="PROGRAMLISTING" >INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '11/27/1994')</PRE >&#13;</P ><P > You can also use the <B CLASS="COMMAND" >copy</B > command to perform load large amounts of data from flat (<SPAN CLASS="ACRONYM" >ASCII</SPAN >) files. This is usually faster because the data is read (or written) as a single atomic transaction directly to or from the target table. An example would be: <PRE CLASS="PROGRAMLISTING" >COPY INTO weather FROM '/home/user/weather.txt' USING DELIMITERS '|';</PRE > where the path name for the source file must be available to the backend server machine, not just the client.&#13;</P ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="query-ug2863.htm" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="user.htm" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="query-ug2896.htm" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Creating a New Class</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="query-ug.htm" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Querying a Class</TD ></TR ></TABLE ></DIV ></BODY ></HTML >

Message-ID: <99Oct20.120020gmt+0100.28729@hdilan.hdi.de>
Permalink:  ../99Oct20.120020gmt+0100.28729@hdilan.hdi.de/
Also on:    postgresql.org/message-id/99Oct20.120020gmt+0100.28729@hdilan.hdi.de

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: Vollmers@hdi.de, docs@postgresql.org
  Subject: Re: Populating a Class with Instances/Postgres Docs
  In-Reply-To: <99Oct20.120020gmt+0100.28729@hdilan.hdi.de>

* 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