Re: some points for FAQ - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: some points for FAQ
Date
Msg-id 200710092107.l99L7Dn19785@momjian.us
Whole thread Raw
In response to Re: some points for FAQ  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Responses Re: some points for FAQ
List pgsql-hackers
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. +


pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: some points for FAQ
Next
From: Bruce Momjian
Date:
Subject: Re: Skytools committed without hackers discussion/review