Re: [BUGS] BUG #2913: Subscript on multidimensional array yields no value

2007-01-30 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> This is not a bug, this is a definitional disagreement, and your TODO >> entry presupposes an answer that I don't particularly agree with. > Well, our documentation suggests thaat [1] is the same as [1:1]: > http://www.postgresql

Re: [BUGS] BUG #2913: Subscript on multidimensional array yields no value

2007-01-30 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I can confirm this is a bug. Added to the TODO list: > > o ARRAY[[1,2],[3,4]])[1] should return the same values as > > ARRAY[[1,2],[3,4]])[1:1]; > > This is not a bug, this is a definitional disagreement, and your T

Re: [BUGS] BUG #2913: Subscript on multidimensional array yields no value

2007-01-30 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I can confirm this is a bug. Added to the TODO list: > o ARRAY[[1,2],[3,4]])[1] should return the same values as > ARRAY[[1,2],[3,4]])[1:1]; This is not a bug, this is a definitional disagreement, and your TODO entry presupposes an ans

Re: [BUGS] BUG #2913: Subscript on multidimensional array yields no value

2007-01-30 Thread Bruce Momjian
I can confirm this is a bug. Added to the TODO list: o ARRAY[[1,2],[3,4]])[1] should return the same values as ARRAY[[1,2],[3,4]])[1:1]; --- Roman Nowak wrote: > > The following bug has been logged onli

Re: [BUGS] BUG #2945: possibly forgotten SPI_push()/SPI_pop()

2007-01-30 Thread Tom Lane
"Sergiy Vyshnevetskiy" <[EMAIL PROTECTED]> writes: > Possible reason is forgotten SPI_push()/SPI_pop() wrapper in domain check > evaluation algorithm. I think it's really plpgsql's fault, not the domain code. Try this patch: http://archives.postgresql.org/pgsql-committers/2007-01/msg00405.php Th

Re: [BUGS] BUG #2945: possibly forgotten SPI_push()/SPI_pop()

2007-01-30 Thread Sergiy Vyshnevetskiy
On Tue, 30 Jan 2007, Tom Lane wrote: Sergiy Vyshnevetskiy <[EMAIL PROTECTED]> writes: This hack makes SPI_pusn()/SPI_pop() wrapper optional. We are *certainly* not fixing it like that. And you shouln't, unless you are thinking of making SPI_pusn()/SPI_pop() wrapper optional - a topic for -

Re: [BUGS] BUG #2945: possibly forgotten SPI_push()/SPI_pop()

2007-01-30 Thread Tom Lane
Sergiy Vyshnevetskiy <[EMAIL PROTECTED]> writes: > This hack makes SPI_pusn()/SPI_pop() wrapper optional. We are *certainly* not fixing it like that. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the post

Re: [BUGS] now() in PL/pgSQL Functions

2007-01-30 Thread Yosef Haas
Ok. Right after I posted I noticed this: "It is important to know that CURRENT_TIMESTAMP and related functions return the start time of the current transaction; their values do not change during the transaction. This is considered a feature: the intent is to allow a single transaction to have a

[BUGS] now() in PL/pgSQL Functions

2007-01-30 Thread Yosef Haas
This is in version 8.1.4. I've noticed what seems to be a strange behavior - it may be by design, but I figured I'd ask. Run this simple test function: create or replace function test() RETURNS bool AS ' begin raise notice ''%'',now(); for i IN 0..5000 lo

Re: [BUGS] BUG #2945: possibly forgotten SPI_push()/SPI_pop()

2007-01-30 Thread Sergiy Vyshnevetskiy
Hackaround attached. This hack makes SPI_pusn()/SPI_pop() wrapper optional.--- src/backend/executor/spi.c.orig Fri Jan 26 13:12:50 2007 +++ src/backend/executor/spi.c Tue Jan 30 12:42:56 2007 @@ -64,16 +64,6 @@ { int newdepth; - /* - * When procedure called by Executor _SPI_curid expected

[BUGS] BUG #2945: possibly forgotten SPI_push()/SPI_pop()

2007-01-30 Thread Sergiy Vyshnevetskiy
The following bug has been logged online: Bug reference: 2945 Logged by: Sergiy Vyshnevetskiy Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2.1 Operating system: FreeBSD-6 stable Description:possibly forgotten SPI_push()/SPI_pop() Details: Preparation: #ps