On Sat, Jan 15, 2005 at 07:03:43PM +0100, Bo Lorentsen wrote:
> select * from sale where id = currval( 'sale_id_seq' )::bigint;
>
> But this still did not work (still using seq scan) :-(
currval() is volatile. See "Function Volatility Categories" in the
"Extending SQL" chapter of the documentation and search the list
archives for past discussion of currval()'s volatility.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/