diff options
author | Bruce Momjian <bruce@momjian.us> | 2006-02-12 19:31:14 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2006-02-12 19:31:14 +0000 |
commit | 05e27a9c20d4cd9f605e8601ca6b04be9056113e (patch) | |
tree | 74614ead3fed9c5a2d2efe06f675eb063efbc687 /src/backend/commands/variable.c | |
parent | 7d57a1825f62a67b0eddc65d8618a9043d14f9e8 (diff) | |
download | postgresql-05e27a9c20d4cd9f605e8601ca6b04be9056113e.tar.gz postgresql-05e27a9c20d4cd9f605e8601ca6b04be9056113e.zip |
Remove LEFT part of JOIN to pg_roles because of optimizer limitation:
> True, but they're not being used where you'd expect. This seems to be
> something to do with the fact that it's not pg_authid which is being
> accessed, but rather the view pg_roles.
I looked into this and it seems the problem is that the view doesn't
get flattened into the main query because of the has_nullable_targetlist
limitation in prepjointree.c. That's triggered because pg_roles has
'********'::text AS rolpassword
which isn't nullable, meaning it would produce wrong behavior if
referenced above the outer join.
Ultimately, the reason this is a problem is that the planner deals only
in simple Vars while processing joins; it doesn't want to think about
expressions. I'm starting to think that it may be time to fix this,
because I've run into several related restrictions lately, but it seems
like a nontrivial project.
In the meantime, reducing the LEFT JOIN to pg_roles to a JOIN as per
Peter's suggestion seems like the best short-term workaround.
Diffstat (limited to 'src/backend/commands/variable.c')
0 files changed, 0 insertions, 0 deletions