3:16 PM
To: 'Keresztury Balázs'; pgsql-performance@postgresql.org
Subject: RE: [PERFORM] forced sequential scan when condition has
current_user
> -Mensaje original-
> De: Keresztury Balázs
>
> hi,
>
> just a small question: is it normal that PostgreSQL 8.4
> -Mensaje original-
> De: Keresztury Balázs
>
> hi,
>
> just a small question: is it normal that PostgreSQL 8.4.1
> always uses sequential scanning on any table when there is a
> condition having the constant "current_user"? Of course there
> is a btree index set on that table, but
Craig Ringer writes:
> Erik Jones wrote:
>> current_user() is a stable function and the manual is explicit that the
>> result of stable function can be used in an index scan:
> Yes ... but the planner doesn't know the value current_user will return,
I think it's got nothing to do with that and
Erik Jones wrote:
> On Jan 4, 2010, at 1:59 PM, Robert Haas wrote:
>
>> The thing is, PostgreSQL doesn't know at planning time what the value of
>> current_user() will be, so the plan can't depend on that; the planner
>> just takes its best shot.
>
> current_user() is a stable function and the m
2010/1/4 Erik Jones :
> On Jan 4, 2010, at 1:59 PM, Robert Haas wrote:
>> The thing is, PostgreSQL doesn't know at planning time what the value of
>> current_user() will be, so the plan can't depend on that; the planner
>> just takes its best shot.
>
> current_user() is a stable function and the ma
On Jan 4, 2010, at 1:59 PM, Robert Haas wrote:
> The thing is, PostgreSQL doesn't know at planning time what the value of
> current_user() will be, so the plan can't depend on that; the planner
> just takes its best shot.
current_user() is a stable function and the manual is explicit that the r
you think this is actually a bug, not a
feature?
balazs
-Original Message-
From: Robert Haas [mailto:robertmh...@gmail.com]
Sent: Monday, January 04, 2010 10:59 PM
To: Keresztury Balázs
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] forced sequential scan when condition has
curr
2010/1/4 Keresztury Balázs :
> just a small question: is it normal that PostgreSQL 8.4.1 always uses
> sequential scanning on any table when there is a condition having the
> constant "current_user"? Of course there is a btree index set on that table,
> but the DBMS just doesn't want to utilize it.