On Thu, Jun 11, 2009 at 4:36 PM, Dimitri Fontaine wrote:
> Vyacheslav Kalinin writes:
>
> > $conn = pg_pconnect("dbname=foo");
>
> Please reconsider and use plain pg_connect().
> --
> dim
>
Uh, I just copied/pasted that part from somewhere in PHP manual, personally
I tend to use plain pg_connect
> Vyacheslav Kalinin writes:
>
>> $conn = pg_pconnect("dbname=foo");
>
> Please reconsider and use plain pg_connect().
Would you like to elaborate on that? Why connect and not pconnect?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
Vyacheslav Kalinin writes:
> $conn = pg_pconnect("dbname=foo");
Please reconsider and use plain pg_connect().
--
dim
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/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);
On Tue, Jun 9, 2009 at 10:35 PM, Tory M Blue wrote:
>
> Thanks guys, the problem with copy from or to is that it creates an
> array and thus puts a load of stuff in memory, it's possible the file
> will get huge and I can't take that memory hit.
>
> I'll look again and see if I missed something
>
On Tue, Jun 9, 2009 at 11:31 AM, Vyacheslav Kalinin wrote:
>> however the COPY
>> command requires superuser and I really don't want to open up the DB
>> from a remote system with Superuser access.
>
> COPY FROM STDIN does not need superuser privileges.
>
Thanks guys, the problem with copy from or
> however the COPY
> command requires superuser and I really don't want to open up the DB
> from a remote system with Superuser access.
COPY FROM STDIN does not need superuser privileges.
> I must be able to do this from a client system, I must be able to lock
> down the db user to limited access and I can take care of permissions
> on the client end, but postgres seems to be slightly rigid in regards
> to the COPY command and the fact that one can't really have a jailed
> superuse