Greg Stark <gsstark(at)mit(dot)edu> writes:
> Consider a query like
> select * from foo where a = currval('xyz') and b = nextval('xyz')
> Though actually I don't really see how any interpretation of this
> query really makes a whole lot of sense.
Yeah. The only moderately credible use-case I've ever seen for volatile
functions in WHERE clauses is
select * from foo where random() < 0.01;
which gets you a random sampling of approximately 1% of the table.
regards, tom lane
In response to
pgsql-general by date
|Next:||From: Brandon Craig Rhodes||Date: 2004-02-26 22:29:17|
|Subject: Re: PostgreSQL on XFS experiences?|
|Previous:||From: mailings||Date: 2004-02-26 22:22:04|
|Subject: Re: Postgres clustering?|