Re: Postgres Pg_connect PHP

From: Vyacheslav Kalinin <vka(at)mgcp(dot)com>
To: Tory M Blue <tmblue(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres Pg_connect PHP
Date: 2009-06-09 18:43:25
Message-ID: 9b1af80e0906091143y741db4f5v3dc55f5ad833d77a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Forgot about COPY command in my previous reply:

$conn = pg_pconnect("dbname=foo");
$fd = fopen('file.dat', 'r');
pg_query($conn, "copy bar from stdin");
while (!feof($fd)) {
pg_put_line($conn, fgets($fd));
}
fclose($fd);
pg_put_line($conn, "\\.\n");
pg_end_copy($conn);

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Agoston Postgres 2009-06-09 20:03:51 aliases for sequences and other DB objects?
Previous Message Vyacheslav Kalinin 2009-06-09 18:41:36 Re: Postgres Pg_connect PHP