On Fri, Oct 5, 2012 at 3:09 AM, Ivan Voras <ivoras@xxxxxxxxxxx> wrote: > I think I can make a fairly educated guess that catching exceptions > while dealing with session variables should be much, much faster than > creating any kind of a table :) That is true, but it's not clear how using session variables keeps you from having to create the table. If the table is already there, a session variable guarding the table construction shouldn't be any faster/better than a simple 'create if not exists'. A catalog scan is basically boils down to a query. So I'm not sure that actually helps. On the other hand, if the temp table can be completely ditched for a session variable or two, then yeah, that would be much better since you'd avoid the overhead of creating the table completely. merlin -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general