From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Mike Mascari <mascarm(at)mascari(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Is this a bug, possible security hole, or wrong |
Date: | 2002-06-13 15:14:54 |
Message-ID: | 20742.1023981294@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Mike Mascari <mascarm(at)mascari(dot)com> writes:
> I apologize. The pg_stat_activity view is a good example of using views
> atop functions to provide security. Its not exactly obvious, but it can
> be done. And with the SRFs coming, I suppose fixing views is a pretty
> low priority...
I've applied the attached patch, which changes the behavior in your
example case. However, in general I do not think it's possible or
desirable to guarantee anything about order of evaluation of WHERE
clauses.
regards, tom lane
*** src/backend/optimizer/plan/planner.c.orig Sat May 18 14:49:41 2002
--- src/backend/optimizer/plan/planner.c Thu Jun 13 11:01:09 2002
***************
*** 656,662 ****
if (childlen <= 1 || (childlen + myothers) <= geqo_rels / 2)
{
newlist = nconc(newlist, subf->fromlist);
! f->quals = make_and_qual(f->quals, subf->quals);
}
else
newlist = lappend(newlist, child);
--- 656,662 ----
if (childlen <= 1 || (childlen + myothers) <= geqo_rels / 2)
{
newlist = nconc(newlist, subf->fromlist);
! f->quals = make_and_qual(subf->quals, f->quals);
}
else
newlist = lappend(newlist, child);
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Jenkins | 2002-06-13 15:36:33 | Trying to get rid of a type |
Previous Message | Stephan Szabo | 2002-06-13 15:05:51 | Re: Troubleshooting SPI_execp() failed in RI_FKey_cascade_del() |