Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group