Re: [HACKERS] temp table problem

2008-07-20 Thread Tom Lane
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes: > The underlying problem is that when we do GetOverrideSearchPath() in > CreateCachedPlan, the memorized search path doesn't include pg_temp, if > the temp namespace wasn't initialized for the backend yet. When we later > need to revalidate the pl

Re: [HACKERS] temp table problem

2008-07-20 Thread Heikki Linnakangas
Tom Lane wrote: What PG version are you testing? Maybe you need to show a complete test case, instead of leaving us to guess at details? I think that example is bogus. Let's forget that one, and look at the attached script. The underlying problem is that when we do GetOverrideSearchPath() i

Re: [HACKERS] temp table problem

2008-07-18 Thread Robert Haas
I can't help suspecting that the two statements in question were run in different sessions (or at least different transactions?). ...Robert On Fri, Jul 18, 2008 at 9:11 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Abbas" <[EMAIL PROTECTED]> writes: >> I have come across a problem. When you try to a

Re: [HACKERS] temp table problem

2008-07-18 Thread Tom Lane
"Abbas" <[EMAIL PROTECTED]> writes: > I have come across a problem. When you try to access a temp table > created via SPI_EXEC, you get a table not found error. > SPI_EXEC("CREATE TEMP TABLE my_temp_table(first_name text, last_name > text)", UTILITY); > SPI_EXEC("REVOKE ALL ON TABLE my_temp_ta

[HACKERS] temp table problem

2008-07-16 Thread Abbas
Hi, I have come across a problem. When you try to access a temp table created via SPI_EXEC, you get a table not found error. SPI_EXEC("CREATE TEMP TABLE my_temp_table(first_name text, last_name text)", UTILITY); SPI_EXEC("REVOKE ALL ON TABLE my_temp_table FROM PUBLIC", UTILITY); The second st