Re: [GENERAL] plperl function

2009-08-13 Thread Emanuel Calvo Franco
> >    ERROR:  operator does not exist: integer = integer[] >    HINT:  No operator matches the given name and argument type(s). >    You might need to add explicit type casts. > Sounds like you are trying to return directly the query. You must do a loop with that query inside (cursor) and use ne

[GENERAL] plperl function

2009-08-13 Thread Janet Jacobsen
Hi. I'm trying to write a plperl function that returns a list of ids that I want to use in a subquery. The function call would look like: select * from mlist( 168.4, 55.2, 0.1); and would return a list of integers. I've written this function, and it returns the right list of integers, but

Re: [GENERAL] plperl function called > once in cascading triggers

2007-03-15 Thread Kenneth Downs
Martijn van Oosterhout wrote: On Wed, Mar 14, 2007 at 08:09:24PM -0400, Kenneth Downs wrote: What I have noticed is that once the innermost instance exits, none of the outer instances execute any further, suggesting that the plperl routine is not "re-entrant" (if I am using that term correct

Re: [GENERAL] plperl function called > once in cascading triggers

2007-03-15 Thread Martijn van Oosterhout
On Wed, Mar 14, 2007 at 08:09:24PM -0400, Kenneth Downs wrote: > What I have noticed is that once the innermost instance exits, none of > the outer instances execute any further, suggesting that the plperl > routine is not "re-entrant" (if I am using that term correctly). Doesn't sound right, do

[GENERAL] plperl function called > once in cascading triggers

2007-03-14 Thread Kenneth Downs
Consider the case where an AFTER STATEMENT trigger calls a plperl function which performs a loop. Inside of the loop it updates at least one other table. The table being updated has an AFTER STATEMENT trigger that calls the same plperl function (w/different parms of course), which goes into

Re: [GENERAL] PLPERL Function very Slow

2006-08-30 Thread codeWarrior
1 -- Drop your indexes on the table to be inserted into. 2 -- Execute a BEGIN transaction 3 -- Execute your inserts. 4 -- Execute a commit or rollback and END transaction 5 -- Rebuild / recreate your indexes "Alex" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > i am havin

Re: [GENERAL] PLPERL Function very Slow

2006-08-30 Thread Tom Lane
Alex <[EMAIL PROTECTED]> writes: > The initial select is pretty fast and first inserts very fast, but after > a few thousand inserts the inserts start to slow down until it crawls. > Writing the same in a normal perl script takes less than 90 seconds > while the function is taking 10 minutes. Can

[GENERAL] PLPERL Function very Slow

2006-08-30 Thread Alex
Hi, i am having a problem with a plperl function i am trying to write. (using 8.1.4) the function does a select (ca 30,000 rows) using spi_query($query); while (my $row = spi_fetchrow($handle)) and within the while loop inserts the record into a table using spi_exec_query($query); The initia

Re: [GENERAL] plperl function to return nulls

2005-09-19 Thread Michael Fuhr
On Mon, Sep 19, 2005 at 10:52:23AM +1200, Brent Wood wrote: > I have a plperl function returning an int. The int is returned as the > result of a system call. > > It is set to return a null if one of the inputs is null, but I can't see > how to return a null if the result is indeterminate. The fun

[GENERAL] plperl function to return nulls

2005-09-19 Thread Brent Wood
I can't find a reference in the docs for this... I have a plperl function returning an int. The int is returned as the result of a system call. It is set to return a null if one of the inputs is null, but I can't see how to return a null if the result is indeterminate. The function currently re

Re: [GENERAL] plperl function fails to "fire" Slony trigger

2005-04-22 Thread Jan Wieck
On 4/22/2005 2:08 PM, Tom Lane wrote: Sven Willenberger <[EMAIL PROTECTED]> writes: We have a replication set up between 2 servers using Slony; both are runnind PostgreSQL 8.0.1. The issue is that when updates/inserts are made to a replicated table, the replication does not occur; apparently this i

[GENERAL] plperl function fails to "fire" Slony trigger

2005-04-22 Thread Sven Willenberger
We have a replication set up between 2 servers using Slony; both are runnind PostgreSQL 8.0.1. The issue is that when updates/inserts are made to a replicated table, the replication does not occur; apparently this is due to spi_exec somehow not allowing/causing the slony trigger function to fire. T

Re: [GENERAL] plperl function fails to "fire" Slony trigger

2005-04-22 Thread Alvaro Herrera
On Fri, Apr 22, 2005 at 03:09:13PM -0400, Sven Willenberger wrote: > On Fri, 2005-04-22 at 14:43 -0400, Alvaro Herrera wrote: > > On Fri, Apr 22, 2005 at 02:24:57PM -0400, Jan Wieck wrote: > > > On 4/22/2005 2:08 PM, Tom Lane wrote: > > > > > > >Sven Willenberger <[EMAIL PROTECTED]> writes: > > >

Re: [GENERAL] plperl function fails to "fire" Slony trigger

2005-04-22 Thread Tom Lane
Sven Willenberger <[EMAIL PROTECTED]> writes: > We have a replication set up between 2 servers using Slony; both are > runnind PostgreSQL 8.0.1. The issue is that when updates/inserts are > made to a replicated table, the replication does not occur; apparently > this is due to spi_exec somehow not

Re: [GENERAL] plperl function fails to "fire" Slony trigger

2005-04-22 Thread Sven Willenberger
On Fri, 2005-04-22 at 14:43 -0400, Alvaro Herrera wrote: > On Fri, Apr 22, 2005 at 02:24:57PM -0400, Jan Wieck wrote: > > On 4/22/2005 2:08 PM, Tom Lane wrote: > > > > >Sven Willenberger <[EMAIL PROTECTED]> writes: > > >>We have a replication set up between 2 servers using Slony; both are > > >>ru

Re: [GENERAL] plperl function fails to "fire" Slony trigger

2005-04-22 Thread Alvaro Herrera
On Fri, Apr 22, 2005 at 02:24:57PM -0400, Jan Wieck wrote: > On 4/22/2005 2:08 PM, Tom Lane wrote: > > >Sven Willenberger <[EMAIL PROTECTED]> writes: > >>We have a replication set up between 2 servers using Slony; both are > >>runnind PostgreSQL 8.0.1. The issue is that when updates/inserts are >

Re: [GENERAL] PLPERL function error - utf-8 to iso8859-1

2003-10-15 Thread Patrick Hatcher
Subject: Re: [GENERAL] PLPERL function error - utf-8 to iso8859-1 10/14/2003

Re: [GENERAL] PLPERL function error - utf-8 to iso8859-1

2003-10-14 Thread Tom Lane
"Patrick Hatcher" <[EMAIL PROTECTED]> writes: > Trying to create a plperl function to strip non-friendly mainframe > characters from a string. However, when I try to add the Trademark symbol > (™) as a replace criteria, PG spits back an error: > ERROR: Could not convert UTF-8 to ISO8859-1 AFAICT