Pavel Stehule wrote:
> > > Better universal solution doesn't exist. Exists only unelegant
> > > solutions - but mutch faster.
> > >
> > > SELECT id, ...
> > > FROM data
> > > WHERE id = ANY(ARRAY(
> > > SELECT (random()*:max_id)::int
> > > FROM generate_series(1,20)))
> > > LIMIT 1;
> > >
> > > max_id is host variable ~ real max id + some
> > >
> > > -- fast solution if id is PK of data
> >
> > Right. We really only want general solutions in the FAQ.
> >
>
> ok. I accept it. Can be some note there? Not this strange select.
Well, with 8.3 having this be faster I am thinking we should wait to see
if the hacks are needed.
> > > Cache invalidation isn't 100% protection before this error message.
> > > With specific using of EXECUTE statement, you can get this message
> > > too. But all temp tables related problems are solved.
> >
> > OK, let's see how many bug reports we get and we can always re-add it.
> >
>
> It's true :). You have to try really wild things inside plpgsql procedures.
Good.
-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB
http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +