J2SE 1.5 Cache Rowset(JSR 114 )
Just as an FYI. Sun's Cache rowset which is new and part of the J2SE 1.5 is not compatable with Postgres. We have been working with Sun's JAVA development team to resolve the issues through our test cases and debugging. We hope that in a future patch update that the issues will be resolved. We'll keep you up to date.
Brian
Hi!
Could I use "use", "require" functions in plperl?
for example,
CREATE OR REPLACE FUNCTION perl_func (text)
RETURNS real
AS '
use HTTP::Request;
use HTTP::Headers;
....
return $value;
'
LANGUAGE 'plperl';
with me it doesn't work and returns error message
"Query failed: ERROR: creation of function failed: 'require' trapped by
operation mask at (eval 2) line 2. in ..."
Thanx
with me it doesn't work and returns error message
"Query failed: ERROR: creation of function failed: 'require' trapped by
operation mask at (eval 2) line 2. in ..."
You need to use plperlu.
Sincerely,
Joshua D. Drake
Thanx
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
--
Command Prompt, Inc., home of PostgreSQL Replication, and plPHP.
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL
On Fri, 7 Jan 2005, Brian Maguire wrote:
Just as an FYI. Sun's Cache rowset which is new and part of the J2SE
1.5 is not compatable with Postgres. We have been working with Sun's
JAVA development team to resolve the issues through our test cases and
debugging. We hope that in a future patch update that the issues will
be resolved. We'll keep you up to date.
Any more details on the problem? A link to Sun's bug database? If you
suspect the postgresql jdbc driver I'd be happy to take a look at a
testcase.
Kris Jurka
On Tue, 2005-01-11 at 14:59 +0300, ON.KG wrote:
I'm trying in 'plperl' forking the processes by 'fork' function,
but receiving this messageWarning: pg_exec(): Query failed: ERROR: creation of function failed: 'fork' trapped by operation mask at (eval 2) line 11.
Does it mean, that in 'plperl' I can't use 'fork' function???
there are 2 variants of the language: plperl and plperlu
plperlu is 'untrusted', that is, it is allowed to do dangerous stuff,
but plperl is more limited and can be used by a user without privileges.
OTOH, i doubt that fork is allowed even in plperlu, as i
imagine it could have weird effects on the backend.
gnari
Import Notes
Reply to msg id not found: 1906385406.20050111145955@on.kg
ON.KG wrote:
Hi All!
I'm trying in 'plperl' forking the processes by 'fork' function, but
receiving this messageWarning: pg_exec(): Query failed: ERROR: creation of function failed:
'fork' trapped by operation mask at (eval 2) line 11.Does it mean, that in 'plperl' I can't use 'fork' function???
Think about it - you're trying to fork an active database backend.
Personally, I'd decouple things and fetch webpages/files from outside
the database anyway.
You might find the documentation on NOTIFY/LISTEN useful.
--
Richard Huxton
Archonet Ltd
Import Notes
Reply to msg id not found: 1906385406.20050111145955@on.kg
Hi All!
I'm trying in 'plperl' forking the processes by 'fork' function,
but receiving this message
Warning: pg_exec(): Query failed: ERROR: creation of function failed: 'fork' trapped by operation mask at (eval 2) line 11.
Does it mean, that in 'plperl' I can't use 'fork' function???
function example
=================
CREATE OR REPLACE FUNCTION perl_fork_test ()
RETURNS int2
AS '
my %pid;
my @urls = (
"http://domain1.com/index.php",
"http://domain2.com/index.php"
);
foreach my $url (@urls) {
unless ($pid{$url} = fork) {
my $html = qx/GET "$url"/;
$ENV{TERM} = &my_exit;
sub my_exit {
exit(0);
}
}
}
sleep 6;
foreach my $url (keys %pid) {
kill SIGTERM, $pid{$url};
}
wait;
return 1;
'
LANGUAGE 'plperl';
===================
VOLATILE
CALLED ON NULL INPUT
SECURITY INVOKER
===================
Thanx
ON.KG wrote:
Hi All!
I'm trying in 'plperl' forking the processes by 'fork' function,
but receiving this message
Have you tried performing this with plperlU?
Sincerely,
Joshua D. Drake
Warning: pg_exec(): Query failed: ERROR: creation of function failed: 'fork' trapped by operation mask at (eval 2) line 11.
Does it mean, that in 'plperl' I can't use 'fork' function???
function example
=================
CREATE OR REPLACE FUNCTION perl_fork_test ()
RETURNS int2
AS '
my %pid;my @urls = (
"http://domain1.com/index.php",
"http://domain2.com/index.php"
);foreach my $url (@urls) {
unless ($pid{$url} = fork) {
my $html = qx/GET "$url"/;$ENV{TERM} = &my_exit;
sub my_exit {
exit(0);
}
}
}sleep 6;
foreach my $url (keys %pid) {
kill SIGTERM, $pid{$url};
}wait;
return 1;
'
LANGUAGE 'plperl';
===================
VOLATILE
CALLED ON NULL INPUT
SECURITY INVOKER
===================Thanx
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL