Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X7WhU-0006U3-JB for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Jul 2014 21:25:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X7WhT-0007sa-WF for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Jul 2014 21:25:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X7QaQ-0000PF-TM for pgsql-bugs@postgresql.org; Wed, 16 Jul 2014 14:53:39 +0000 Received: from formauri.es ([78.47.205.180]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X7QaM-0004uQ-0d for pgsql-bugs@postgresql.org; Wed, 16 Jul 2014 14:53:35 +0000 Received: from [0.0.0.0] (formauri.es [78.47.205.180]) by formauri.es (Postfix) with ESMTPS id EFD0F8002C; Wed, 16 Jul 2014 16:53:29 +0200 (CEST) Message-ID: <53C691DC.3020002@personal.formauri.es> Date: Wed, 16 Jul 2014 16:53:16 +0200 From: Pedro Gimeno User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Icedove/24.6.0 MIME-Version: 1.0 To: David Tonhofer , pgsql-bugs@postgresql.org Subject: Re: Documentation problem: The syntax for "\copy" is just wrong References: <53C4267E.8090900@gluino.name> In-Reply-To: <53C4267E.8090900@gluino.name> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org David Tonhofer wrote, On 2014-07-14 20:50: > At > > > http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-META-COMMANDS-COPY > > the syntax for the \copy command is given as follows: > > \copy { table [ ( column_list ) ] | ( query ) } { from | to } { > 'filename' | program 'command' | stdin | stdout | pstdin | pstdout } [ [ > with ] ( option [, ...] ) ] > > [...] > > According to the description as given, the following should work. > > \copy table_to_fill from 'foofile.csv' with format csv, header true, > delimiter ','; This seems to be frequently reported. Can the parentheses be made more prominent, e.g. by boldfacing them or putting them in quotes? They are fairly easy to miss, because of the metacharacters [ ] { } interspersed and the use of different conventions in different grammar specifications. Alternatively, perhaps mention the parentheses explicitly in the text? To the OP, this should work: \copy table_to_fill from 'foofile.csv' with (format csv, header true, delimiter ','); -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs