Re: Postgres Pg_connect PHP - Mailing list pgsql-general

From Vyacheslav Kalinin
Subject Re: Postgres Pg_connect PHP
Date
Msg-id 9b1af80e0906091143y741db4f5v3dc55f5ad833d77a@mail.gmail.com
Whole thread Raw
In response to Re: Postgres Pg_connect PHP  (Vyacheslav Kalinin <vka@mgcp.com>)
Responses Re: Postgres Pg_connect PHP
List 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);

pgsql-general by date:

Previous
From: Vyacheslav Kalinin
Date:
Subject: Re: Postgres Pg_connect PHP
Next
From: Agoston Postgres
Date:
Subject: aliases for sequences and other DB objects?