[GENERAL] plperl and regexps with accented characters - incompatible?

2007-11-10 Thread hubert depesz lubaczewski
hi, i wrote this function: #v+ CREATE OR REPLACE FUNCTION test(TEXT) RETURNS bool language plperl as $$ return (shift =~ /[a-ząćęłńóśźżĄĆĘŁŃŚÓŹŻ0-9_-]+/i) || 0; $$; #v- it's functioning it not really relevant. important thing is, that the creation of it fails: psql:z.sql:25: ERROR: creation of P

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-10 Thread rihad
Scott Marlowe wrote: On Nov 9, 2007 5:17 AM, rihad <[EMAIL PROTECTED]> wrote: Em Wednesday 07 November 2007 13:54:32 rihad escreveu: May I, as an outsider, comment? :) I really think of ASC NULLS FIRST (and DESC NULLS LAST) as the way to go. Imagine a last_login column that sorts users that hav

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-10 Thread Scott Marlowe
On Nov 9, 2007 5:17 AM, rihad <[EMAIL PROTECTED]> wrote: > > Em Wednesday 07 November 2007 13:54:32 rihad escreveu: > >> > >> May I, as an outsider, comment? :) I really think of ASC NULLS FIRST > >> (and DESC NULLS LAST) as the way to go. Imagine a last_login column that > >> sorts users that have

Re: [GENERAL] strange infinite loop in plpgsql

2007-11-10 Thread rihad
rihad <[EMAIL PROTECTED]> writes: LOOP SELECT date+1 INTO day FROM days WHERE date=day OR EXTRACT(dow FROM day) IN (0,6); EXIT WHEN NOT FOUND; timeout := timeout + 86400; END LOOP; If the EXTRACT condition is true, then the SELECT will always succeed. Isn't th

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-10 Thread Tom Lane
=?ISO-8859-1?Q?Christian_Schr=F6der?= <[EMAIL PROTECTED]> writes: > Although I do not yet have any processes that are stuck inside a > statement, there are some that are idle, but do not respond to SIGINT or > even SIGTERM. Is this sufficient? Dunno. Have you looked at their call stacks with gd

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-10 Thread Christian Schröder
Tom Lane wrote: OK. For the moment I confess bafflement. You had offered access to your system to probe more carefully --- once you've built up two or three stuck processes again, I would like to take a look. Although I do not yet have any processes that are stuck inside a statement, ther

[GENERAL] Verison 8.3 PL/pgSQL debugger Question

2007-11-10 Thread Tony Caduto
Hi, Is there any documentation for developers on how to use the new debugger in 8.3? Specifically on how it works and general guidelines on integration into 3rd party GUI applications. thanks, Tony ---(end of broadcast)--- TIP 3: Have you check

Re: [GENERAL] strange infinite loop in plpgsql

2007-11-10 Thread rihad
Tom Lane wrote: rihad <[EMAIL PROTECTED]> writes: LOOP SELECT date+1 INTO day FROM days WHERE date=day OR EXTRACT(dow FROM day) IN (0,6); EXIT WHEN NOT FOUND; timeout := timeout + 86400; END LOOP; If the EXTRACT condition is true, then the SELECT will always su

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-10 Thread Tom Lane
=?ISO-8859-1?Q?Christian_Schr=F6der?= <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Maybe this is just a cross-distribution difference in file layouts, >> but I'm suddenly wondering if there's a 32-vs-64-bit issue here. >> Exactly which perl packages have you got installed? > rpm says: "perl-5.

Re: [GENERAL] strange infinite loop in plpgsql

2007-11-10 Thread Tom Lane
rihad <[EMAIL PROTECTED]> writes: > LOOP >SELECT date+1 INTO day FROM days WHERE date=day OR EXTRACT(dow > FROM day) IN (0,6); >EXIT WHEN NOT FOUND; >timeout := timeout + 86400; > END LOOP; If the EXTRACT condition is true, then the SELECT will always succeed. Th

[GENERAL] strange infinite loop in plpgsql

2007-11-10 Thread rihad
I've been reading the online docs, but... code like this somehow ends up in an indefinite loop: CREATE OR REPLACE FUNCTION foo() RETURNS int AS $$ DECLARE timeout int; day date; BEGIN day := current_date + 1; LOOP SELECT date+1 INTO day FROM days WHERE date=day OR EXTRACT(dow

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-10 Thread Christian Schröder
Tom Lane wrote: I don't think you ever mentioned exactly what platform you're running on; it seems to be some 64-bit Linux variant but you didn't say which. The machine has two dual-core Xeon 5130 cpus. The os is openSUSE 10.2 (x86-64). The output of uname -a is: Linux db2 2.6.18.8-0.7-de

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-10 Thread David Fetter
On Fri, Nov 09, 2007 at 03:17:53PM +0400, rihad wrote: > >Em Wednesday 07 November 2007 13:54:32 rihad escreveu: > >> > >>May I, as an outsider, comment? :) I really think of ASC NULLS > >>FIRST (and DESC NULLS LAST) as the way to go. Imagine a last_login > >>column that sorts users that have not l