From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Jason Ziegler <moo(at)zigfam(dot)org> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: newbie sql question... |
Date: | 2003-05-27 15:41:17 |
Message-ID: | 20030527083923.A2773-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 27 May 2003, Jason Ziegler wrote:
> Hello folks, I'm new to this list, and have been putting up with mysql
> for too long, so please forgive me for asking such a newbie question as
> this:
>
> I have a query that works in mysql:
> "INSERT INTO table1 ( id, column2, column3 ) VALUES ( '1', 'text
> stuff', 'text stuff' ), ( '2', 'more text', 'even more text')"
>
> When I try this in postgresql, it won't work:
> "INSERT INTO table1 ( 'id', 'column2', 'column3' ) VALUES ( '1', 'text
> stuff', 'text stuff' ), ( '2', 'more text', 'even more text')"
There are two problems with this. The first is that postgresql doesn't
yet support multiple rows in the values section iirc, the second is that
single quoting the column names will give a parse error.
You can either use multiple inserts or possibly copy as workarounds.
From | Date | Subject | |
---|---|---|---|
Next Message | Nailah Ogeer | 2003-05-27 15:41:50 | Relation hash table |
Previous Message | scott.marlowe | 2003-05-27 15:28:28 | Re: Hello |