Search Postgresql Archives

Re: temp table same name real table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Wed, Sep 30, 2020, 7:27 AM v.brusa@xxxxxxxxxxx <v.brusa@xxxxxxxxxxx> wrote:


Hi all,
I have this strange behavior when I use temp table with same name of a permanent table in a function.

IMO, you are asking for strange behavior when you overload a table name.

I expect that one of the people who work down deep down in the code will say it is a caching thing that saves system table lookups. It also may be required to ensure consistent behavior when you use the same table name (non specified schema) then you should always get the same table.

Still, it might be simple to use exceptions and try to read the pg_temp table and if it does not exist, try the public schema.

Or, just schema qualify the fetch call with a string that is computed for which schema you want to use.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux