Re: BUG #16758: create temporary table with the same name loses defaults, indexes
От | Tom Lane |
---|---|
Тема | Re: BUG #16758: create temporary table with the same name loses defaults, indexes |
Дата | |
Msg-id | 1399710.1606842461@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #16758: create temporary table with the same name loses defaults, indexes (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #16758: create temporary table with the same name loses defaults, indexes
|
Список | pgsql-bugs |
[ please keep the mailing list cc'd ] Marc Boeren <m.boeren@guidance.nl> writes: >> Without having dug into the code, I bet what is >> happening is that after creating pg_temp.xx, the LIKE code is looking >> to see "what indexes exist on table xx?", to which the answer is "none" >> because it finds pg_temp.xx. We need to nail down the schema in which >> xx is sought for that step. As a workaround, you could nail down the >> schema manually: >> >> create temporary table xx (like public.xx including DEFAULTS including >> CONSTRAINTS including INDEXES); > This workaround works both on the example code, and on my production code. Thanks for confirming the diagnosis! > Not sure if it's a bug worth fixing, but perhaps a mention in the documentation? No, it's definitely a bug IMO. The change in behavior was not intentional. regards, tom lane
В списке pgsql-bugs по дате отправления: