Re: pg_temp 101 question

From: Konstantin Izmailov <pgfizm(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_temp 101 question
Date: 2011-01-04 04:32:12
Message-ID: AANLkTikmG8b+4BHEom5CZiOSJ6Edn8bUu5iViPKiiLs6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom, thank you for the suggestion - it looks like it is working!

I've found another solution by looking into psql source code:

nspname like 'pg_temp%' AND pg_catalog.pg_table_is_visible(C.oid)

can also be added to the query for the purpose.

On 1/3/11, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Konstantin Izmailov <pgfizm(at)gmail(dot)com> writes:
>> My application creates/uses a temporary table "X" via multiple
>> connections at the same time. Is there a way to determine which
>> pg_temp_N belongs to the current connection?
>
> It seems unlikely that you need to determine that explicitly to solve
> your problem. Just use WHERE C.oid = 'X'::regclass to constrain the
> pg_class query, and forget matching to the schema name at all.
>
> regards, tom lane
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message AI Rumman 2011-01-04 05:45:19 is it good to disable autovacuum and schedule routine vacuum process?
Previous Message Tom Lane 2011-01-04 04:20:17 Re: pg_temp 101 question