Re: [GENERAL] 'prepare' is not quite schema-safe

2005-05-01 Thread Steve Atkins
On Sun, May 01, 2005 at 11:19:16PM -0400, Tom Lane wrote: > Vlad <[EMAIL PROTECTED]> writes: > > i.e. the following perl code won't work correctly with DBD::Pg 1.40+ > > > $dbh->do("SET search_path TO one"); > > my $sth1 = $dbh->prepare_cached("SELECT * FROM test WHERE item = ?"); > > $sth1->execu

Re: [GENERAL] success with p2p ip connection

2005-05-01 Thread Chris Smith
Please reply to the same thread you start instead of starting a new one every time (choose the last reply and hit "Reply to All"). [EMAIL PROTECTED] wrote: I looked at the server machine, in a section regarding ip connections, and saw that security was set to prevent other machines from connecti

Re: [GENERAL] 'prepare' is not quite schema-safe

2005-05-01 Thread Tom Lane
Vlad <[EMAIL PROTECTED]> writes: > so is it possible that a successfully prepared (and possibly a couple > of times already executed) query will be invalidated by postgresql > for some reason (like lack of memory for processing/caching other > queries)? Assuming that no database structure changes

Re: [GENERAL] 'prepare' is not quite schema-safe

2005-05-01 Thread Vlad
btw, after re-reading the second part of your comment once again, I have a (clarification) question: so is it possible that a successfully prepared (and possibly a couple of times already executed) query will be invalidated by postgresql for some reason (like lack of memory for processing/caching

Re: [GENERAL] 'prepare' is not quite schema-safe

2005-05-01 Thread Vlad
yeah, I agree. perhaps a more correct solution would be to adjust DBD::Pg to detect changes of active schema and store instances of server side prepared queries tieing them up with query + current schema, not only a query as it's now (as I understand)... On 5/2/05, Neil Conway <[EMAIL PROTECTED]

Re: [GENERAL] 'prepare' is not quite schema-safe

2005-05-01 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > An alternative would be to flush dependent plans when the schema search > path is changed. I think this would actually be the Wrong Thing. It's certainly a debatable point --- but the best analogy we have is the behavior of plpgsql functions in the face

Re: [GENERAL] 'prepare' is not quite schema-safe

2005-05-01 Thread Neil Conway
Tom Lane wrote: That's what it is supposed to do. It would hardly be possible to "prepare" a query at all if we had to wait till EXECUTE to find out which tables it was supposed to use. An alternative would be to flush dependent plans when the schema search path is changed. In effect this would m

Re: [GENERAL] 'prepare' is not quite schema-safe

2005-05-01 Thread Tom Lane
Vlad <[EMAIL PROTECTED]> writes: > i.e. the following perl code won't work correctly with DBD::Pg 1.40+ > $dbh->do("SET search_path TO one"); > my $sth1 = $dbh->prepare_cached("SELECT * FROM test WHERE item = ?"); > $sth1->execute("one"); > $dbh->do("set search_path to two"); > my $sth2 = $dbh->p

Re: [GENERAL] 'prepare' is not quite schema-safe

2005-05-01 Thread Vlad
Tom, thanks for you reply. > That's what it is supposed to do. It would hardly be possible to > "prepare" a query at all if we had to wait till EXECUTE to find out > which tables it was supposed to use. I understand that from postgresql point of view everything is logical. From the application

Re: [GENERAL] [Dbdpg-general] 'prepare' is not quite schema-safe

2005-05-01 Thread Vlad
> the first problem you have is that you have a critical production system > that you upgraded without going through proper test first. > That's just bad change control. > In any case, if the new DBD::Pg blew up in your face why did you not > immediately revert to the previous working one? Even if

Re: [GENERAL] could not load library plperl.so

2005-05-01 Thread CSN
--- Tom Lane <[EMAIL PROTECTED]> wrote: > CSN <[EMAIL PROTECTED]> writes: > > createlang: language installation failed: ERROR: > > could not load library > > "/usr/lib/postgresql/plperl.so": libperl.so: > cannot > > open shared object file: No such file or directory > > Notice it's complaining a

Re: [GENERAL] [Dbdpg-general] 'prepare' is not quite schema-safe

2005-05-01 Thread Dana Hudes
On Sun, 1 May 2005, Vlad wrote: > Hello, > > I'm seeking for an advise to solve the issue that we hit recently > (cost me sleepless night after production server upgrade). the first problem you have is that you have a critical production system that you upgraded without going through proper

Re: [GENERAL] could not load library plperl.so

2005-05-01 Thread Tom Lane
CSN <[EMAIL PROTECTED]> writes: > createlang: language installation failed: ERROR: > could not load library > "/usr/lib/postgresql/plperl.so": libperl.so: cannot > open shared object file: No such file or directory Notice it's complaining about libperl.so, not plperl.so. This is probably because

Re: [GENERAL] 'prepare' is not quite schema-safe

2005-05-01 Thread Tom Lane
Vlad <[EMAIL PROTECTED]> writes: > SET search_path TO one; > PREPARE st( VARCHAR(20) ) AS SELECT * FROM test WHERE item = $1; > EXECUTE st( 'one' ); > SET search_path TO two; > -- next statement fails because st selects from one.test, not from two.test > EXECUTE st( 'two' ); That's what it is

Re: [GENERAL] could not load library plperl.so

2005-05-01 Thread Alvaro Herrera
On Sun, May 01, 2005 at 05:52:14PM -0700, CSN wrote: > createlang: language installation failed: ERROR: > could not load library > "/usr/lib/postgresql/plperl.so": libperl.so: cannot > open shared object file: No such file or directory You need your Perl installation to have libperl as a shared

[GENERAL] I receieved an example of Rekall script

2005-05-01 Thread Typing80wpm
I had posted and emailed various places, to find a tutorial or example of how to write my own scripts in Rekall to access Postgresql.  Someone was kind enough to send me the following example, so I want to share it with anyone who may be interested in using Rekall as a front end to Postgresql

[GENERAL] 'prepare' is not quite schema-safe

2005-05-01 Thread Vlad
Hello, I'm seeking for an advise to solve the issue that we hit recently (cost me sleepless night after production server upgrade). The actual environment is Apache+mod_perl, Postgresql 8.0.2. After upgrading DBD::Pg to the 1.41 version (which supports preparing quries on "server" side) we hit a

Re: [GENERAL] libpq and PQexecPrepared

2005-05-01 Thread Tom Lane
Harry Jackson <[EMAIL PROTECTED]> writes: > The params are correct for the entry in the logs at [7-1] but if you > look at [9-1] the params are in the wrong order. This looks odd to me > and I was wondering if someone could explain this? Not the same parameters --- those $n are plpgsql doing its o

[GENERAL] could not load library plperl.so

2005-05-01 Thread CSN
I configured postgres base+opt with '--with-perl', make'd, and make install'ed. Trying to add plperl: createlang -U postgres plperl links I get this error: createlang: language installation failed: ERROR: could not load library "/usr/lib/postgresql/plperl.so": libperl.so: cannot open shared obj

Re: [GENERAL] Can't compile plphp

2005-05-01 Thread Russell Smith
On Mon, 2 May 2005 06:05 am, CSN wrote: > I'm following the directions here: > http://plphp.commandprompt.com/documentation.html > > (Note that they differ from the directions included in > plphp-7.4.x.tar.bz2, which I've also tried.) > > Using Postgres 7.4.7 and PHP 5.0.4. When I do this: > The

[GENERAL] libpq and PQexecPrepared

2005-05-01 Thread Harry Jackson
I have been trying to use PQexecPrepared but so far have been having little success. I have looked at the docs and there is very little in there by way of examples. I am not really a native C programmer hence my reason for assuming its my own fault and not a bug in PG but I have noticed some things

[GENERAL] Can't compile plphp

2005-05-01 Thread CSN
I'm following the directions here: http://plphp.commandprompt.com/documentation.html (Note that they differ from the directions included in plphp-7.4.x.tar.bz2, which I've also tried.) Using Postgres 7.4.7 and PHP 5.0.4. When I do this: 7. Build and install your plphp.so library. cd src/pl