No: the function is calc_total(int,int,int) and the table have the
same types.
As Tom said that my problem is because of planning in pl/pgsql. As
is written in
http://www.postgresql.org/docs/7.3/static/plpgsql.html#PLPGSQL-OVERVIEW
plans for queries in pl/pgsql are made just once - when they are
Andriy Tkachuk wrote:
Hi folks.
What's wrong with planner that executes my query in function?:
(i mean no explanation but runtime)
tele=# EXPLAIN analyze select calc_total(6916799, 1062363600, 1064955599);
QUERY PLAN
Andriy Tkachuk <[EMAIL PROTECTED]> writes:
> What's wrong with planner that executes my query in function?:
> tele=# EXPLAIN analyze select sum(cost) from bills where (parent(user_id) = 6916799
> or user_id = 6916799) and dat >= 1062363600 and dat < 10649555
> 99;
In the function case, the plann
Hi folks.
What's wrong with planner that executes my query in function?:
(i mean no explanation but runtime)
tele=# EXPLAIN analyze select calc_total(6916799, 1062363600, 1064955599);
QUERY PLAN
-