Re: [GENERAL] pl/perl and recent perl versions - failing to load internal modules

2014-07-01 Thread Alex Hunsaker
On Tue, Jul 1, 2014 at 7:31 PM, Alex Hunsaker wrote: > On Tue, Jul 1, 2014 at 6:39 PM, Toby Corkindale > wrote: >> Hi Alex, >> However the following code fails: >> => do $$ "\N{U+263A}" =~ /[[:punct:]]/$$ language plperl; >> ERROR: Unable to load utf8.pm into plperl at line 1. >> BEGIN failed-

Re: [GENERAL] pl/perl and recent perl versions - failing to load internal modules

2014-07-01 Thread Alex Hunsaker
On Tue, Jul 1, 2014 at 6:39 PM, Toby Corkindale wrote: > Hi Alex, > your example (chr(0x100) =~ /\\xa9/) works on my instance (pg 9.3.4, plperl > 5.18) > However the following code fails: > => do $$ "\N{U+263A}" =~ /[[:punct:]]/$$ language plperl; > ERROR: Unable to load utf8.pm into plperl at

Re: [GENERAL] pl/perl and recent perl versions - failing to load internal modules

2014-07-01 Thread Toby Corkindale
To: "Toby Corkindale" > Cc: "pgsql-general" > Sent: Wednesday, 2 July, 2014 9:28:52 AM > Subject: Re: [GENERAL] pl/perl and recent perl versions - failing to load > internal modules > > On Mon, Jun 30, 2014 at 7:47 PM, Toby Corkindale > wrote: > >

Re: [GENERAL] pl/perl and recent perl versions - failing to load internal modules

2014-07-01 Thread Toby Corkindale
Corkindale" > Cc: "pgsql-general" > Sent: Wednesday, 2 July, 2014 9:28:52 AM > Subject: Re: [GENERAL] pl/perl and recent perl versions - failing to load > internal modules > > On Mon, Jun 30, 2014 at 7:47 PM, Toby Corkindale > wrote: > > Hi, >

Re: [GENERAL] pl/perl and recent perl versions - failing to load internal modules

2014-07-01 Thread Alex Hunsaker
On Mon, Jun 30, 2014 at 7:47 PM, Toby Corkindale wrote: > Hi, > I've been trying out PostgreSQL 9.3 with pl/perl built against Ubuntu 14.04 > LTS' Perl 5.18 > (Sourced from apt.postgresql.org) > > Maybe I'm doing something wrong, but it appears that plperl has become > completely useless, as it

Re: [GENERAL] Pl/perl and perl version-tip in doc

2011-01-06 Thread Richard Huxton
On 06/01/11 18:07, pasman pasmański wrote: It is need tip in doc which version of perl must be installed. Error message tells nothing. For example Postgres 8.4 works only with perl 5.10. Are you sure that's the case? Could it be that you're using a pre-compiled version of plperl? -- Richar

Re: [GENERAL] pl/perl interpreter instance(s) - how long does it persist?

2010-12-08 Thread Toby Corkindale
On 09/12/10 13:37, Tom Lane wrote: Toby Corkindale writes: I would like to know how long the pl/perl interpreter instances persist? Till end of session. Where session = connection (whether from psql, DBI, etc), yes? Initial testing seems to give me contrary results. In some cases, creati

Re: [GENERAL] pl/perl interpreter instance(s) - how long does it persist?

2010-12-08 Thread Tom Lane
Toby Corkindale writes: > I would like to know how long the pl/perl interpreter instances persist? Till end of session. > Initial testing seems to give me contrary results. > In some cases, creating a new DB then loading the same module in a new > stored procedure will get the old version. > Bu

Re: [GENERAL] pl/perl object destruction (or lack thereof) at session end

2010-12-08 Thread Toby Corkindale
On 09/12/10 13:00, Toby Corkindale wrote: Hi, Looking at this: http://www.postgresql.org/docs/9.0/interactive/plperl-under-the-hood.html Specifically, the "known limitations" part, I see it says: When a session ends normally, not due to a fatal error, any END blocks that have been defined are ex

Re: [GENERAL] pl-perl for 64 bits in Solaris 9

2010-07-09 Thread Felipe de Jesús Molina Bravo
well after many problems i can install sunstudio 11; but now my problem is: > > > - environment: > bash-2.05# echo $CC > /opt/SunStudio/bin/cc > > bash-2.05# echo $CFLAGS > -xarch=v9 -O > > - my configure was: > > ./configure --with-CC=/opt/SunStudio/bin/cc --with-perl --without-readline

Re: [GENERAL] pl-perl for 64 bits in Solaris 9

2010-07-07 Thread Felipe de Jesús Molina Bravo
El 26 de junio de 2010 16:56, Felipe de Jesús Molina Bravo < fjmolinabr...@gmail.com> escribió: > > > 2010/6/25 John R Pierce > >> On 06/25/10 9:28 PM, Felipe de Jesús Molina Bravo wrote: >> >> original perl is 5.6. so i installed perl 5.8.9 for 64 bit and the >>> error is the same... maybe m

Re: [GENERAL] pl-perl for 64 bits in Solaris 9

2010-06-26 Thread Felipe de Jesús Molina Bravo
2010/6/25 John R Pierce > On 06/25/10 9:28 PM, Felipe de Jesús Molina Bravo wrote: > >> original perl is 5.6. so i installed perl 5.8.9 for 64 bit and the >> error is the same... maybe my error is with the compiler, it is "gcc" >> (3.4.6). is it possible? >> > > where did this 64bit 5.8.9 c

Re: [GENERAL] pl-perl for 64 bits in Solaris 9

2010-06-25 Thread John R Pierce
On 06/25/10 9:28 PM, Felipe de Jesús Molina Bravo wrote: original perl is 5.6. so i installed perl 5.8.9 for 64 bit and the error is the same... maybe my error is with the compiler, it is "gcc" (3.4.6). is it possible? where did this 64bit 5.8.9 come from? I try to downloaded SunStudio

Re: [GENERAL] pl-perl for 64 bits in Solaris 9

2010-06-25 Thread Felipe de Jesús Molina Bravo
2010/6/25 John R Pierce > On 06/25/10 2:21 PM, MOLINA BRAVO FELIPE DE JESUS wrote: > >> Hi >> >> I don't have experience with solaris. I know it is a 64 bits: >> >> bash-2.05# isainfo -v >> 64-bit sparcv9 applications >> 32-bit sparc applications >> >> >> >> I tried to compile postgres (Version o

Re: [GENERAL] pl-perl for 64 bits in Solaris 9

2010-06-25 Thread John R Pierce
On 06/25/10 2:21 PM, MOLINA BRAVO FELIPE DE JESUS wrote: Hi I don't have experience with solaris. I know it is a 64 bits: bash-2.05# isainfo -v 64-bit sparcv9 applications 32-bit sparc applications I tried to compile postgres (Version of postgres: 8.4.4 ) with plperl for 64 bits. The option

Re: [GENERAL] pl/perl setof function

2010-01-13 Thread Andy Colson
On 1/13/2010 1:26 PM, Andy Colson wrote: On 1/13/2010 12:20 PM, Alex - wrote: Hi, i have a PL/PERL RETURN SETOF function which processes a few 10k records. The processing takes quite some time and in order to display progress I use a return_next after every few thousand records. However, the fu

Re: [GENERAL] pl/perl setof function

2010-01-13 Thread Andy Colson
On 1/13/2010 12:20 PM, Alex - wrote: Hi, i have a PL/PERL RETURN SETOF function which processes a few 10k records. The processing takes quite some time and in order to display progress I use a return_next after every few thousand records. However, the function returns all messages when it comple

Re: [GENERAL] pl/perl not rethrowing pl/pgsql exceptions

2010-01-05 Thread Merlin Moncure
On Tue, Jan 5, 2010 at 12:49 PM, Merlin Moncure wrote: > is this behavior correct? > > create or replace function error() returns text as > $$ > begin >  raise exception 'test!'; > end; > $$ language plpgsql; > > > create or replace function test() returns text as > $$ >  my $res = spi_query("sele

Re: [GENERAL] PL/Perl Performance Problems

2009-12-21 Thread Alex -
Thanks,I am already have started doing that. i.e. running the dummy task to get the tables loaded again and it worked fine today. regardsAlex > To: ainto...@hotmail.com > CC: scott.marl...@gmail.com; pgsql-general@postgresql.org > Subject: Re: [GENERAL] PL/Perl Performance Problem

Re: [GENERAL] PL/Perl Performance Problems

2009-12-20 Thread Tom Lane
Alex - writes: > Tom, Scott, Alvaro,thanks for the hints on this issue. It looks as if one of > the EOD maintenance jobs which does a few extensive queries does push data > out of memory leading to this behavior. > Is there a way to permanently cash some tables into memory? Not as such, and if

Re: [GENERAL] PL/Perl Performance Problems

2009-12-20 Thread Alex -
:10:36 -0700 > Subject: Re: [GENERAL] PL/Perl Performance Problems > From: scott.marl...@gmail.com > To: ainto...@hotmail.com > CC: t...@sss.pgh.pa.us; pgsql-general@postgresql.org > > According to your original post, you do selects in step 1 and 2... Or > is this a differe

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Alex -
simple inserts. after the insert the job will call the function and there i have the same issues. runs slow in the morning, and fast in the afternoon. it will pick up speed after 5-10k records thanks for your help > Date: Sat, 19 Dec 2009 00:10:36 -0700 > Subject: Re: [GENERAL] PL/Perl Perfo

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Scott Marlowe
wrote: > On a 2nd thought... where does the cach come into play when i only do > inserts and no selects. > Alex > >> Date: Fri, 18 Dec 2009 23:45:07 -0700 >> Subject: Re: [GENERAL] PL/Perl Performance Problems >> From: scott.marl...@gmail.com >> To: ainto...@hot

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Alex -
On a 2nd thought... where does the cach come into play when i only do inserts and no selects. Alex > Date: Fri, 18 Dec 2009 23:45:07 -0700 > Subject: Re: [GENERAL] PL/Perl Performance Problems > From: scott.marl...@gmail.com > To: ainto...@hotmail.com > CC: t...@sss.pgh.pa.us

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Alex -
18 Dec 2009 23:45:07 -0700 > Subject: Re: [GENERAL] PL/Perl Performance Problems > From: scott.marl...@gmail.com > To: ainto...@hotmail.com > CC: t...@sss.pgh.pa.us; pgsql-general@postgresql.org > > On Fri, Dec 18, 2009 at 11:37 PM, Alex - wrote: > > Hmm... > > how can

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Scott Marlowe
On Fri, Dec 18, 2009 at 11:37 PM, Alex - wrote: > Hmm... > how can that be. This is happening every day, so its not a one off or > happens once in the morning then in the afternoon. There is also no other > task running on the system, its dedicated to postgres. > Could the Autovacuum cause problem

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Alex -
day but the keep silent till the day timestamp breaks ? The think is that I have 4 servers setup in a similar way and all have exactly the same problem. > Date: Fri, 18 Dec 2009 23:00:16 -0700 > Subject: Re: [GENERAL] PL/Perl Performance Problems > From: scott.marl...@gmail.com &g

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Scott Marlowe
Note that you seem to have a lot more IO wait in the first run than in the second, which means that the task is hitting the disks more in the first run than in the second one. Once IO wait starts to climb, performance starts to dive, generally. -- Sent via pgsql-general mailing list (pgsql-gener

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Alex -
I run AutovacuumI run a Vaccum Full Analyze every SatI re-index the tables every Sat > Date: Fri, 18 Dec 2009 21:20:23 -0300 > From: alvhe...@commandprompt.com > To: ainto...@hotmail.com > CC: t...@sss.pgh.pa.us; pgsql-general@postgresql.org > Subject: Re: [GENERAL] PL/Perl Perfo

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Alvaro Herrera
Alex - wrote: > > Tom, I am logging these stats now, but i am having a similar issue. both jobs > in the morning and after noon insert about 400k records (200k each) > In the morning that job takes 450secIn the afternoon only 150; No select, > simple parsing a file and insert the records > These

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Alex -
0 1238 6720 2611 352 15 1 75 10 0 > To: ainto...@hotmail.com > CC: pgsql-general@postgresql.org > Subject: Re: [GENERAL] PL/Perl Performance Problems > Date: Fri, 18 Dec 2009 15:36:15 -0500 > From: t...@sss.pgh.pa.us > > Alex - writes: > > I actually looked

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Alex -
Thank, I will check that out. > To: ainto...@hotmail.com > CC: pgsql-general@postgresql.org > Subject: Re: [GENERAL] PL/Perl Performance Problems > Date: Fri, 18 Dec 2009 15:36:15 -0500 > From: t...@sss.pgh.pa.us > > Alex - writes: > > I actually looked at that to

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Tom Lane
Alex - writes: > I actually looked at that too, but there is no swapping going on. If you were only watching for swapping, that wouldn't catch what I'm talking about. Replacing cached disk buffers with other disk data doesn't count as swapping in any system I've used. re

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Alex -
I actually looked at that too, but there is no swapping going on. The system also has 16GB memory allocated to postgres and during the processing there is not other process really active. > To: ainto...@hotmail.com > CC: pgsql-general@postgresql.org > Subject: Re: [GENERAL] PL/Perl Pe

Re: [GENERAL] PL/Perl Performance Problems

2009-12-18 Thread Tom Lane
Alex - writes: > Now here is what I noticed. > a) if I run it in the morning, processing starts very slow, but after a few > thousand records it will speed up until I actually get about 100 records > processed per millisecond. > b) it sometime takes about 5-10k records till i really get up to sp

Re: [GENERAL] PL/Perl 64-bit and sending emails

2009-09-04 Thread Dimitri Fontaine
Hi, Steve Atkins writes: > On Sep 3, 2009, at 11:30 AM, Mark Lubratt wrote: >> Or, does someone know of another way to get the >> backend to send an email? > > Have a queue table in the database you put your emails into and an external > process that polls the table, sends the email and deletes

Re: [GENERAL] PL/Perl 64-bit and sending emails

2009-09-03 Thread Steve Atkins
On Sep 3, 2009, at 11:30 AM, Mark Lubratt wrote: Hello! I've been running the 64-bit version of 8.3.4 on OpenSolaris 2009.06 for over a year. Now, I need to put a perl function call into it to allow emails to be sent by the database backend. I tried installing plperl, but it looks like

Re: [GENERAL] Pl/;perl

2008-05-07 Thread Craig Ringer
George R. C. Silva wrote: > i have activeperl 5.1 installed and pgsql 8.3 You'll need ActivePerl 5.8 . -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] pl/perl autonomous transactions question

2006-09-27 Thread Robert Treat
On Monday 25 September 2006 15:05, Bob wrote: > I would like to use autonomous transactions for a large batch process and I > want this all encapsulated within stored procedures. I want to commit after > say every 15,000 records. The only way I have found to do this is to use > the perl DBI in my s

Re: [GENERAL] pl/perl autonomous transactions question

2006-09-26 Thread Jim Nasby
On Sep 25, 2006, at 3:05 PM, Bob wrote: One issue I see with my current DBI solution is I need to hard code or pass in as variables the connection information. I would prefer not to have the password lying around in plain site. Keep in mind this is a batch process not a something I that i

Re: [GENERAL] PL/Perl questions...

2006-06-16 Thread David Fetter
On Fri, Jun 16, 2006 at 11:42:51AM -0500, LLC wrote: > Hi List; > > I have 2 questions... > > 1) I want to create a perl function which connects to an external > non-Postgres database and retrieves data. I wonder is the best way > to do this to return a set or an array? I assume returning a dat

Re: [GENERAL] pl/perl error

2006-04-10 Thread Frank
On Sun, Apr 09, 2006 at 06:22:40PM -0400, Tom Lane wrote: > Frank <[EMAIL PROTECTED]> writes: > > I have a perl script running as a daemon. It's using DBD::Pg (1.43) to > > connect to my Postgres server (8.0.7) running on the same box and talking > > over a socket. When I start the server, it run

Re: [GENERAL] pl/perl error

2006-04-09 Thread Tom Lane
Frank <[EMAIL PROTECTED]> writes: > I have a perl script running as a daemon. It's using DBD::Pg (1.43) to > connect to my Postgres server (8.0.7) running on the same box and talking > over a socket. When I start the server, it runs fine for about a day, and > then at some point I start getting t

Re: [GENERAL] pl/perl error

2006-04-09 Thread Douglas McNaught
Frank <[EMAIL PROTECTED]> writes: > I have a perl script running as a daemon. It's using DBD::Pg (1.43) to > connect to my Postgres server (8.0.7) running on the same box and talking > over a socket. When I start the server, it runs fine for about a day, and > then at some point I start getting

Re: [GENERAL] PL/PERL: raise notice, exception ?

2005-04-05 Thread Jim C. Nasby
On Tue, Apr 05, 2005 at 07:37:03AM -0700, David Fetter wrote: > On Tue, Apr 05, 2005 at 04:28:10PM +0200, Philippe Lang wrote: > > Hi, > > > > Is there in PL/PERL, under PG 8.01, an equivalent for the "raise > > notice, exception" commands of PL/PGSQL? > > Use the elog() function. :) See also ht

Re: [GENERAL] PL/PERL: raise notice, exception ?

2005-04-05 Thread David Fetter
On Tue, Apr 05, 2005 at 04:28:10PM +0200, Philippe Lang wrote: > Hi, > > Is there in PL/PERL, under PG 8.01, an equivalent for the "raise > notice, exception" commands of PL/PGSQL? Use the elog() function. :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100

Re: [GENERAL] PL/PERL with composite return values & PGSQL 7.4?

2005-04-01 Thread Tom Lane
"Philippe Lang" <[EMAIL PROTECTED]> writes: > Documentation mentions that PGSQL 8 supports a version of PL/PERL with > composite return values. Is there a way to install this new version of > PL/PERL on an old 7.4 database, No. The rest of it might work, but not that feature, at least not without

Re: [GENERAL] pl/perl problem of memory

2005-03-25 Thread Tom Lane
"GIROIRE Nicolas (COFRAMI)" <[EMAIL PROTECTED]> writes: > In fact, now i put the variable to '' ( $myvar = '' ) but it seems that Perl > don't empty totally memory. See the nearby thread "plperl doesn't release memory". There's some evidence that this may be due to a Perl configuration issue.

Re: [GENERAL] pl/perl problem

2005-03-23 Thread FERREIRA William (COFRAMI)
Title: RE: [GENERAL] pl/perl problem yes, it works exactly what i needed, thanks a lot -Message d'origine- De : Richard Huxton [mailto:dev@archonet.com] Envoyé : mardi 22 mars 2005 12:41 À : FERREIRA William (COFRAMI) Cc : 'Sean Davis'; pgsql-general@postgresql

Re: [GENERAL] pl/perl problem

2005-03-23 Thread FERREIRA William (COFRAMI)
Title: RE: [GENERAL] pl/perl problem thanks a lot with your example and the example of Richard it works fine -Message d'origine- De : Sean Davis [mailto:[EMAIL PROTECTED]] Envoyé : mardi 22 mars 2005 12:51 À : FERREIRA William (COFRAMI) Cc : pgsql-general@postgresql.org Objet

Re: [GENERAL] pl/perl problem

2005-03-22 Thread Sean Davis
On Mar 22, 2005, at 3:13 AM, FERREIRA William (COFRAMI) wrote: my function is very long but i found an example with the same comportment : CREATE OR REPLACE FUNCTION adoc.totoTest()   RETURNS int4 AS $BODY$  my $var = '->>>';  &concat($var);  sub concat {   $var .= 'tagada';  }  elog NOTICE, $var

Re: [GENERAL] pl/perl problem

2005-03-22 Thread Richard Huxton
FERREIRA William (COFRAMI) wrote: my function is very long but i found an example with the same comportment : CREATE OR REPLACE FUNCTION adoc.totoTest() RETURNS int4 AS $BODY$ my $var = '->>>'; &concat($var); sub concat { $var .= 'tagada'; } elog NOTICE, $var; return 4; $BODY$ LANGUAGE

Re: [GENERAL] pl/perl problem

2005-03-22 Thread FERREIRA William (COFRAMI)
essage d'origine-De : Sean Davis [mailto:[EMAIL PROTECTED]Envoyé : lundi 21 mars 2005 16:46À : FERREIRA William (COFRAMI); pgsql-general@postgresql.orgObjet : Re: [GENERAL] pl/perl problem   - Original Message - From: FERREIRA William (COFRAMI) To

Re: [GENERAL] pl/perl problem

2005-03-21 Thread Sean Davis
Title: RE: [GENERAL] Convert Cursor to array   - Original Message - From: FERREIRA William (COFRAMI) To: 'pgsql-general@postgresql.org' Sent: Monday, March 21, 2005 9:22 AM Subject: [GENERAL] pl/perl problem hi   i wrote a store procedure using the pl/pe

Re: [GENERAL] PL/Perl trusted throws error on example function

2005-03-03 Thread Frank Finner
Hi Tom, I found an error right between my ears, means, I had looked at the client__s version of Safe, not thinking about the fact that I was connected to the database on a server which actually had Safe installed only with version 2.07. I upgraded Safe now from CPAN on my server and everything wo

Re: [GENERAL] PL/Perl trusted throws error on example function

2005-03-03 Thread Tom Lane
Frank Finner <[EMAIL PROTECTED]> writes: > error from Perl function: trusted Perl functions disabled - please > upgrade Perl Safe module to version 2.09 or later at (eval 4) line 1. What do you get from perl -e 'require Safe; print "$Safe::VERSION\n"' regards, tom

Re: [GENERAL] PL/Perl

2005-01-11 Thread Joshua D. Drake
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 (ev

Re: [GENERAL] PL/Perl

2005-01-11 Thread Richard Huxton
ON.KG wrote: 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???

Re: [GENERAL] PL/Perl

2005-01-11 Thread Ragnar Hafstað
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 message > > Warning: pg_exec(): Query failed: ERROR: creation of function failed: 'fork' > trapped by operation mask at (eval 2) line 11. > > Does it mean, tha

Re: [GENERAL] PL/Perl

2005-01-07 Thread Joshua D. Drake
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)--- T

Re: [GENERAL] PL/Perl

2005-01-07 Thread Pavel Stehule
Hello, you have to use plperlu, untrusted plperl regards Pavel Stehule On Fri, 7 Jan 2005, ON.KG wrote: > 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::Head

Re: [GENERAL] Pl/Perl w/ Postgres 8.0 on Windows

2004-12-02 Thread Eric E
Thanks to both of you gentlemen. I actually had to restart Postgres after installing ActiveState Perl before I could successfully run createlang and add the language. Seems to be working now, though. Cheers, Eric Magnus Hagander wrote: Hi all, I am throughly enjoying using Postgres 8.0 on W

Re: [GENERAL] Pl/Perl w/ Postgres 8.0 on Windows

2004-12-02 Thread Magnus Hagander
> Hi all, > I am throughly enjoying using Postgres 8.0 on Windows, so > I can develop my Windows client against Postgres. > I would like to write some pl/perl functions, and I'm a > little stumped. > Now comes the sad confession - I installed PG from the > Windows installer rather than bu

Re: [GENERAL] Pl/Perl speed

2004-01-14 Thread Joshua D. Drake
Chris Ochs wrote: I am pretty sure I know this already, but every time you run a Pl/Perl function it is just like running a perl script as far as having to load and compile the code right? My application runs under mod perl so I'm thinking that speed is not something I would gain by putting any o

Re: [GENERAL] Pl/Perl speed

2004-01-13 Thread Tom Lane
"Chris Ochs" <[EMAIL PROTECTED]> writes: > I am pretty sure I know this already, but every time you run a Pl/Perl > function it is just like running a perl script as far as having to load and > compile the code right? No, the perl script gets compiled only the first time the function is invoked (w

Re: [GENERAL] pl/perl function life and variable scope - concurrency problem?

2003-11-12 Thread Doug McNaught
Christopher Murtagh <[EMAIL PROTECTED]> writes: > Thanks to a lot of help on this list, I've managed to get my pl/perl > function working. However, I have an unexpected result. Here's a simple > way to reproduce this problem: > > CREATE or REPLACE FUNCTION perltest(integer) > returns integer as

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-11 Thread Christopher Murtagh
On Tue, 2003-11-11 at 00:07, Joe Conway wrote: > Write a Pl/Perl function that just does the syscall, and call it from > PL/pgSQL. Similarly for complex string parsing, etc. That would work if I could get the Pl/Perl function to return an array or set of results, but this brings me back to the o

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-11 Thread Joe Conway
Alvaro Herrera wrote: Well, I wasn't the OP ;-). I thought Tcl had the capability, as it is sometimes said to be the most advanced PL. Nah, that would be PL/R ;-) Joe ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-11 Thread Joe Conway
Joe Conway wrote: Christopher Murtagh wrote: That would work if I could get the Pl/Perl function to return an array or set of results, but this brings me back to the original problem (unless I'm missing something obvious). Sorry, I guess I didn't sufficiently understand the issue. I don't reall

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-10 Thread Joe Conway
Christopher Murtagh wrote: On Tue, 2003-11-11 at 00:07, Joe Conway wrote: Write a Pl/Perl function that just does the syscall, and call it from PL/pgSQL. Similarly for complex string parsing, etc. That would work if I could get the Pl/Perl function to return an array or set of results, but this b

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-10 Thread Joshua D. Drake
Christopher Murtagh wrote: On Mon, 2003-11-10 at 23:05, Joshua D. Drake wrote: Hello, If you can code in Perl then pl/C wouldn't be a deep jump. That might not be a bad idea. Haven't done much C programming since my CS days, but I really loved it then. Other than here: http://www.pos

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-10 Thread Joe Conway
Christopher Murtagh wrote: On Mon, 2003-11-10 at 21:11, Joshua D. Drake wrote: The fact that it is pl/pgSQL? Seriously though, I think that pl/pgSQL is counter intuitive to some people and those of us who are coming from say a Perl background are going to be much more proficient in using pl/Perl

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-10 Thread Alvaro Herrera
On Mon, Nov 10, 2003 at 03:00:34PM -0800, Joshua D. Drake wrote: > >>Better start learning Tcl ... > What are we torturing people now? Can plPython do this? Well, aparently Tcl is not up to the task either, nor is plPython. At least I can find no mention on the docs nor the source code. Can yo

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-10 Thread Christopher Murtagh
On Mon, 2003-11-10 at 23:05, Joshua D. Drake wrote: > Hello, > >If you can code in Perl then pl/C wouldn't be a deep jump. That might not be a bad idea. Haven't done much C programming since my CS days, but I really loved it then. Other than here: http://www.postgres.org/docs/7.3/static

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-10 Thread Joe Conway
Christopher Murtagh wrote: On Mon, 2003-11-10 at 16:52, Alvaro Herrera wrote: Better start learning Tcl ... Thanks for the info. I'm ok with that, I like Perl, but I can live without it too. :-) Two questions: 1) Can Tcl return multiple rows? 3) ok, 3 questions... Any word on pl/php and a release

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-10 Thread Joshua D. Drake
Hello, If you can code in Perl then pl/C wouldn't be a deep jump. J Christopher Murtagh wrote: On Mon, 2003-11-10 at 21:11, Joshua D. Drake wrote: The fact that it is pl/pgSQL? Seriously though, I think that pl/pgSQL is counter intuitive to some people and those of us who are coming from

Re: [GENERAL] PL/Perl returning multiple rows

2003-11-10 Thread Christopher Murtagh
On Mon, 2003-11-10 at 21:11, Joshua D. Drake wrote: > The fact that it is pl/pgSQL? Seriously though, I think that pl/pgSQL is > counter intuitive to some people and those of us who are coming from say a Perl > background are going to be much more proficient in using pl/Perl then having > to learn

Re: [GENERAL] PL/Perl in 7.1.1

2001-05-16 Thread Tom Lane
Jeff Patterson <[EMAIL PROTECTED]> writes: > I recently upgraded from 7.0.3 to 7.1. Everything went fine until I went to > install plperl using createlang. It throws the following error message: > ERROR: Load of file /usr/local/pgsql/lib/plperl.so failed: >/usr/lib/perl5/5.6.0/i686-linux/auto/

Re: [GENERAL] PL/Perl without shared libperl.a

2001-05-12 Thread Alan Young
On Fri, 11 May 2001, Tom Lane wrote: > I believe you could actually use a non-shared libperl.a on Intel Linux; > just dike out the test for shared-ness in plperl's Makefile.PL. > The reason it's there is we couldn't think of a direct test for > position-independent code, which is the real requirem

Re: [GENERAL] PL/Perl without shared libperl.a

2001-05-11 Thread Tom Lane
Ian Lance Taylor <[EMAIL PROTECTED]> writes: > As far as I know, there is no simple way to test whether libperl.a is > compiled as position independent code or not. But it would be fairly > easy to test whether you can build a shared library using libperl.a, > by writing a little test case which

Re: [GENERAL] PL/Perl without shared libperl.a

2001-05-11 Thread Tom Lane
Ian Lance Taylor <[EMAIL PROTECTED]> writes: >> I believe you could actually use a non-shared libperl.a on Intel Linux; >> just dike out the test for shared-ness in plperl's Makefile.PL. >> The reason it's there is we couldn't think of a direct test for >> position-independent code, which is the r

Re: [GENERAL] PL/Perl without shared libperl.a

2001-05-11 Thread Tom Lane
Andrew Perrin <[EMAIL PROTECTED]> writes: > Has anyone got advice on building postgres 7.1 with PL/Perl support > WITHOUT having one's perl installation built with a shared libperl.a? Try repeating the Perl build with shared-lib selected and then just installing the resulting libperl.so beside l

Re: [GENERAL] PL/Perl Question

2001-04-20 Thread Doug McNaught
Hitesh Patel <[EMAIL PROTECTED]> writes: > I need to be able to execute SQL commands from inside a plperl > function and can't figure if I can do this. Also.. after executing > the query I need to be able to grab the number of tuples returned > and there values.. how would I go about doing this.

Re: [GENERAL] PL/Perl

2000-11-13 Thread Edward Q. Bridges
n.b. to clarify, i got PL/Perl working on RH Linux 6.2 am in the process of attempting to get it working on NT. ==BEGIN FORWARDED MESSAGE== when i did what's described below, i had no problems at all with PL/Perl (and, in fact, am using it for a couple of trig

Re: [GENERAL] PL/Perl

2000-11-13 Thread Edward Q. Bridges
when i did what's described below, i had no problems at all with PL/Perl (and, in fact, am using it for a couple of triggers that are lightly used in a production environment) http://www.postgresql.org/cgi/cvsweb.cgi/pgsql/src/pl/plperl/README?rev=1.2&content-type=text/x-cvsweb- markup you can

Re: [GENERAL] PL/Perl compilation error

2000-10-17 Thread Alex Pilosov
On Tue, 17 Oct 2000, Tom Lane wrote: > Gilles DAROLD <[EMAIL PROTECTED]> writes: > >> The problem is this will break on older copies of Perl. > > > This problem is solved by perl itself ! > > Yeah, it is: there is a module called Devel::PPPort that isolates > user C code from the incompatibilit

Re: [GENERAL] PL/Perl compilation error

2000-10-16 Thread Tom Lane
Gilles DAROLD <[EMAIL PROTECTED]> writes: I have take a look to the source code concerning PL/Perl, it seems that 2 >variables have a bad call : errgv and na. If you replace them by their normal call (in 5.6.0) PL_errgv and PL_na you will >get success to compile the lib

Re: [GENERAL] PL/Perl compilation error

2000-10-16 Thread Gilles DAROLD
Bruce Momjian wrote: > Can you send me a patch? > > > Hi, > > > > I have take a look to the source code concerning PL/Perl, it seems that 2 variables > > have a bad call : errgv and na. > > > > If you replace them by their normal call (in 5.6.0) PL_errgv and PL_na you will get > > success to comp

Re: [GENERAL] PL/Perl compilation error

2000-10-16 Thread Bruce Momjian
Can you send me a patch? > Hi, > > I have take a look to the source code concerning PL/Perl, it seems that 2 variables > have a bad call : errgv and na. > > If you replace them by their normal call (in 5.6.0) PL_errgv and PL_na you will get > success to compile the lib plperl.so. > > Also in

Re: [GENERAL] PL/Perl compilation errorRe: [GENERAL] PL/Perl compilation error

2000-09-05 Thread Jan Wieck
Tom Lane wrote: > Alex Guryanow <[EMAIL PROTECTED]> writes: > > [root@eaccess plperl]# perl Makefile.PL > > For recent Perl versions you need to do > perl Makefile.PL POLLUTE=1 > instead. The src/pl Makefile would've done it that way for you, > but it looks like that code patch didn't mak

Re: [GENERAL] PL/Perl compilation error

2000-09-04 Thread Gilles DAROLD
Hi, I have take a look to the source code concerning PL/Perl, it seems that 2 variables have a bad call : errgv and na. If you replace them by their normal call (in 5.6.0) PL_errgv and PL_na you will get success to compile the lib plperl.so. Also in Perl documentation you will find the answer f