Re: [BUGS] Daylight saving bug in PostgreSQL 7.2.1 ?

2003-07-12 Thread Jacek Kalinski
Dnia 07/12/2003 04:54 AM, Jonas Lindholm napisaƂ(a):
Hi!

I believe I've found a bug with daylight saving time.
The example below shows that after inserting a row with a date and time 
when daylight saving is changing (6 April 2003 02:00:00) any selects 
using the same time and date are only returning correct result first 
time. If the select is done again the row is not found.
Hi,

I had similar problem that select returned 1 or 0 rows (with the same 
query) (if you want - see "SELECT bug?")

I don't know where is the problem, but try to reindex table timespan.
In my database it resolved all problems (hope so ;) )
Now select return correct values.
Jacek

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [BUGS] Daylight saving bug in PostgreSQL 7.2.1 ?

2003-07-12 Thread Tom Lane
Jonas Lindholm <[EMAIL PROTECTED]> writes:
> I believe I've found a bug with daylight saving time.

I cannot reproduce this here, using either 7.2.4 or current.

regards, tom lane

---(end of broadcast)---
TIP 8: explain analyze is your friend


[BUGS] Function immutable is not during a reindex ?

2003-07-12 Thread Mendola Gaetano
Hi all, 
I'm running the followin example on Postgres 7.3.3
I notice that if I declare an immutable function like this:


CREATE OR REPLACE FUNCTION test (integer) RETURNS integer
 AS '
declare
begin
 raise notice ''test called'';
 return $1+1;
end;'
LANGUAGE plpgsql IMMUTABLE;

and I use this function for a partial index:

create table t_a
(
  a integer,
  b integer
);

insert into t_a values ( 1, 0 );
insert into t_a values ( 1, 1 );
insert into t_a values ( 1, 2 );

Now creating an index on that table:

create index idxv on t_a ( b ) where test(3) = b;
NOTICE:  test called
NOTICE:  test called
NOTICE:  test called
CREATE INDEX


the function is immutable but is executed 3 times
( one for each row).

The same if I reindex the table:

reindex table t_a;
NOTICE:  test called
NOTICE:  test called
NOTICE:  test called
REINDEX


Regards
Gaetano Mendola














---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [BUGS] [ADMIN] Function immutable is not during a reindex ?

2003-07-12 Thread Tom Lane
"Mendola Gaetano" <[EMAIL PROTECTED]> writes:
> the function is immutable but is executed 3 times
> ( one for each row).

So?  Sounds to me like it's working as intended.

regards, tom lane

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org