Re: Perl function leading to out of memory error

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Perl function leading to out of memory error
Дата
Msg-id CAMkU=1w1hHLOLHkNcDUN12QU3nUY9tQ6x6=LTAZfA-8623RzUw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Perl function leading to out of memory error  (Christian Schröder <cs@deriva.de>)
Ответы Re: Perl function leading to out of memory error  (Christian Schröder <cs@deriva.de>)
Список pgsql-general
On Wed, Feb 20, 2013 at 9:31 AM, Christian Schr=F6der <cs@deriva.de> wrote:

> after some investigation it seems that the error has to do with a domain
> type that we have defined in our database. We have defined the following
> helper functions:
>
...
>
> CREATE DOMAIN isin AS char(12) CHECK (isin_ok(value));

Could you give some example values that meet this criteria?  Trying to
reverse engineer your helper functions is no fun.

>
> Now we can create our test case. Create the following table:
>
> CREATE TABLE foo (isin char(12) NOT NULL);
>
> And this function:
>
> CREATE OR REPLACE FUNCTION foo(isin char(12)) RETURNS void AS $$
> my ($isin) =3D @_;
>
> my $stmt =3D spi_prepare('
>     INSERT INTO foo (isin)
>     VALUES ($1)', 'isin');
> spi_exec_prepared($stmt, $isin);
> spi_freeplan($stmt);
> $$ LANGUAGE plperl VOLATILE STRICT;

That should be easy enough to re-write as plpgsql.  If you do, does it
still leak?

Cheers,

Jeff

В списке pgsql-general по дате отправления:

Предыдущее
От: Sergey Konoplev
Дата:
Сообщение: Re: PgBouncer with many databases
Следующее
От: Kirk Wythers
Дата:
Сообщение: Re: PostgreSQL took over my login