[ 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