plperl crashes backend

Поиск
Список
Период
Сортировка
От John Hansen
Тема plperl crashes backend
Дата
Msg-id 1100663355.14124.19.camel@localhost.localdomain
обсуждение исходный текст
Ответы Re: plperl crashes backend  (Michael Fuhr <mike@fuhr.org>)
Re: plperl crashes backend  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following function:

create function text_to_words(text)
returns setof text as $_$
    my %stopwords =3D ( 'i' =3D> 'i','me' =3D> 'me','my' =3D> 'my','myself'=
 =3D> 'myself','we' =3D> 'we','our' =3D> 'our','ours' =3D> 'ours','ourselve=
s' =3D> 'ourselves','you' =3D> 'you','your' =3D> 'your','yours' =3D> 'yours=
','yourself' =3D> 'yourself','yourselves' =3D> 'yourselves','he' =3D> 'he',=
'him' =3D> 'him','his' =3D> 'his','himself' =3D> 'himself','she' =3D> 'she'=
,'her' =3D> 'her','hers' =3D> 'hers','herself' =3D> 'herself','it' =3D> 'it=
','its' =3D> 'its','itself' =3D> 'itself','they' =3D> 'they','them' =3D> 't=
hem','their' =3D> 'their','theirs' =3D> 'theirs','themselves' =3D> 'themsel=
ves','what' =3D> 'what','which' =3D> 'which','who' =3D> 'who','whom' =3D> '=
whom','this' =3D> 'this','that' =3D> 'that','these' =3D> 'these','those' =
=3D> 'those','am' =3D> 'am','is' =3D> 'is','are' =3D> 'are','was' =3D> 'was=
','were' =3D> 'were','be' =3D> 'be','been' =3D> 'been','being' =3D> 'being'=
,'have' =3D> 'have','has' =3D> 'has','had' =3D> 'had','having' =3D> 'having=
','do' =3D> 'do','does' =3D> 'does','did' =3D> 'did','doing' =3D> 'doing','=
a' =3D> 'a','an' =3D> 'an','the' =3D> 'the','and' =3D> 'and','but' =3D> 'bu=
t','if' =3D> 'if','or' =3D> 'or','because' =3D> 'because','as' =3D> 'as','u=
ntil' =3D> 'until','while' =3D> 'while','of' =3D> 'of','at' =3D> 'at','by' =
=3D> 'by','for' =3D> 'for','with' =3D> 'with','about' =3D> 'about','against=
' =3D> 'against','between' =3D> 'between','into' =3D> 'into','through' =3D>=
 'through','during' =3D> 'during','before' =3D> 'before','after' =3D> 'afte=
r','above' =3D> 'above','below' =3D> 'below','to' =3D> 'to','from' =3D> 'fr=
om','up' =3D> 'up','down' =3D> 'down','in' =3D> 'in','out' =3D> 'out','on' =
=3D> 'on','off' =3D> 'off','over' =3D> 'over','under' =3D> 'under','again' =
=3D> 'again','further' =3D> 'further','then' =3D> 'then','once' =3D> 'once'=
,'here' =3D> 'here','there' =3D> 'there','when' =3D> 'when','where' =3D> 'w=
here','why' =3D> 'why','how' =3D> 'how','all' =3D> 'all','any' =3D> 'any','=
both' =3D> 'both','each' =3D> 'each','few' =3D> 'few','more' =3D> 'more','m=
ost' =3D> 'most','other' =3D> 'other','some' =3D> 'some','such' =3D> 'such'=
,'no' =3D> 'no','nor' =3D> 'nor','not' =3D> 'not','only' =3D> 'only','own' =
=3D> 'own','same' =3D> 'same','so' =3D> 'so','than' =3D> 'than','too' =3D> =
'too','very' =3D> 'very','s' =3D> 's','t' =3D> 't','can' =3D> 'can','will' =
=3D> 'will','just' =3D> 'just','don' =3D> 'don','should' =3D> 'should','now=
' =3D> 'now' );
    my $textstring =3D $_[0];
       $textstring =3D~ s/[\`\`\~\!\@\#\$\%\^\&\*\(\)\_\+\-\=3D\{\}\[\]\\\|=
\:\;\"\"\'\'\<\>\,\.\?\/]+/ /gi;    my @words =3D split /\ /,$textstring;
    my $res =3D [];
=20
    foreach my $word (@words) {
    $word =3D~ s/([A-Z])/lc($1)/ge;
    if($word ne $stopwords{$word} && $word ne '') {
        push @$res,$word;
    }
    }
    return $res;
$_$ language plperl immutable strict;

creashes the backend, UNLESS it's executed in the same session where it was=
 created.

Kind regards,

John

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

Предыдущее
От: Stefanos Harhalakis
Дата:
Сообщение: Re: Bogus error message about private key (not a bug).
Следующее
От: Neil Conway
Дата:
Сообщение: Re: BUG #1321: SSL error: sslv3 alert handshake failure