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

--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to