On Sun, Sep 18, 2011 at 5:10 PM, Robert Haas <robertmh...@gmail.com> wrote: > On Thu, Sep 15, 2011 at 12:05 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> Alvaro Herrera <alvhe...@commandprompt.com> writes: >>> Excerpts from Abel Abraham Camarillo Ojeda's message of mié sep 14 18:33:33 >>> -0300 2011: >>>> _n_srv=# create table pg_temp.c (x int); >>>> CREATE TABLE >>>> _n_srv=# drop table pg_temp.c; >>>> DROP TABLE >>>> _n_srv=# create table pg_temp.c (x int unique); >>>> ERROR: temporary tables cannot specify a schema name >> >>> FWIW this does work in 9.0. >> >> In that case I'm betting Robert broke it somewhere in the unlogged-table >> changes. > > Yeah, looks like it. Will investigate.
I committed a localized fix for this. Basically, it now double-checks that the schema name isn't the one that would have been forced by the temp-ness, and doesn't throw an error if they match. However, I'm wondering if it would be better to instead (a) jigger things so that RangeVarAdjustRelationPersistence sets the schema name to NULL if it changes the relpersistence, or (b) just remove the cross-check in RangeVarGetRelid() altogether (or demote it to an elog or assert). It's not clear to me under what circumstances this check can actually be hit any more, and if there are any they probably need to be fixed further upstream. However, I didn't feel safe doing either of those things without discussion, especially in a back-branch the day before we wrap 9.1.1. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs