Re: insert more than one rows

From: "Andrej Ricnik-Bay" <andrej(dot)groups(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: insert more than one rows
Date: 2006-06-30 20:37:08
Message-ID: b35603930606301337h1dc429b6h94b6cfed6b066f2b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 7/1/06, Garcia, Joshua <Joshua(dot)Garcia(at)xerox(dot)com> wrote:
>> PQexec(conn, "CREATE TABLE foo (a int4, b char(16), d double
>> precision)");
>> PQexec(conn, "COPY foo FROM STDIN DELIMITER AS '|'");
>> foreach ($my_results as &$value) {
>> PQputline(conn, $value);
>> }
>> PQputline(conn,"\\.\n");
>> PQendcopy(conn);

> Is there a way to do that without using deprecated libpq copy functions?

Ummm ... copy in that example is an SQL function.
http://www.postgresql.org/docs/8.1/interactive/sql-copy.html
Unless of course the PHP guys have made any of the sql statements
an implementation of libpq (in which case the answer to your
question would be no).

> Thanks,
> Josh
Cheers,
Andrej

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Derrick Betts 2006-06-30 22:32:38 Column names as variables in plpgsql
Previous Message Michael Swierczek 2006-06-30 19:33:51 Re: JDBC getConnection with Tomcat