http://archives.postgresql.org/pgsql-hackers/2004-10/msg00964.php It is still true in 8.1. Is it still true in >8.1? Will something like that in a function be statically compiled or computed every time? _Basket_seq:= pg_get_serial_sequence('shop_commerce_baskets', lower('BasketID')); If not any way to make it static and avoid passing one more parameter to the function? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend