matt@xxxxxxxxxx writes: > Thanks for this. Out of curiosity, why is a static a bad way to do this? Well, it wouldn't allow more than one instance of the function per query, and it wouldn't reset correctly after an error, and surely you agree that your proposal of making the user do a separate "reset" step is an unreliable and unpleasant-to-use kluge. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general