From: Richard Huxton <dev@archonet.com>
To: Klas Stockhem <Klas.Stockhem@benders.se>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problems when copy data from dump file
Date: Tue, 04 Aug 2009 09:09:03 +0100
Message-ID: <4A77EC9F.1020202@archonet.com> (raw)
In-Reply-To: <2A250781A3744D48B1529FCC3C2EB8ABCB465E@comserver.benders.se>
References: <2A250781A3744D48B1529FCC3C2EB8ABCB465E@comserver.benders.se>
Klas Stockhem wrote:
> SQL error:
>
> ERROR: syntax error at or near "5"
>
> LINE 2: 5 Slitasje og vedlikehold PRAKTISKE OPPLYSNINGER\r\n\r\nSn&#...
>
> ^
> COPY artikkel (id, tittel, tekst) FROM stdin;
>
> 5 Slitasje og vedlikehold PRAKTISKE
> OPPLYSNINGER\r\n\r\nSnø og is.\r\nSnør...and more text... \.
1. Do you really have a blank line between "COPY" and "5"? If so, that's
your problem.
2. Are you perhaps copying+pasting from a Windows machine to a Linux one
or similar? You might be getting "\r\n" at the end of lines when it's
expecting "\n".
> The postgresql version is 7.4.17.
Might want to set aside some time to upgrade in the near future - you're
missing four full versions since 2003. At the very least, upgrade to
7.4.25 at your earliest convenience.
--
Richard Huxton
Archonet Ltd
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-sql@postgresql.org
Cc: dev@archonet.com, Klas.Stockhem@benders.se
Subject: Re: Problems when copy data from dump file
In-Reply-To: <4A77EC9F.1020202@archonet.com>
* 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