Re: Are temp table really invisible for existing table
| От | Tom Lane |
|---|---|
| Тема | Re: Are temp table really invisible for existing table |
| Дата | |
| Msg-id | 20320.996850058@sss.pgh.pa.us обсуждение |
| Ответ на | Are temp table really invisible for existing table (pgsql-bugs@postgresql.org) |
| Список | pgsql-bugs |
pgsql-bugs@postgresql.org writes:
> but, when i try to create a new table (not temp) with the same name
> as that of name of temporary table recently created it gives me
> message as "the table already exists"
This is the intended behavior...
> should it be happened ?
Dunno. As things currently stand, the only thing we could do
differently is to automatically drop the temp table when we see a
regular create for the same name. (If we don't, the existence of
the temp table creates naming conflicts that will cause problems
for the regular create.) That doesn't seem like a great idea to me.
> * Is there any function to check the existance of temporary table,
Not at the moment. You might consider creating the temp table at the
start of a client session, and letting the function just assume that
it exists. (Once we implement schemas it should be possible to look
in the system catalogs to check existence of a temp table, but the
way it's done right now is a kluge that's not reflected in the
catalogs.)
regards, tom lane
В списке pgsql-bugs по дате отправления: