Re: PostgreSQL 14.7 "ALTER TABLE IF EXISTS" fails - ERROR: schema/relation "" does not exist

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL 14.7 "ALTER TABLE IF EXISTS" fails - ERROR: schema/relation "" does not exist
Дата
Msg-id 376055.1678373479@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PostgreSQL 14.7 "ALTER TABLE IF EXISTS" fails - ERROR: schema/relation "" does not exist  ("Salavessa, Joao (Senior Developer)" <Joao.Salavessa@sky.uk>)
Ответы RE: [EXTERNAL] Re: PostgreSQL 14.7 "ALTER TABLE IF EXISTS" fails - ERROR: schema/relation "" does not exist  ("Salavessa, Joao (Senior Developer)" <Joao.Salavessa@sky.uk>)
Список pgsql-bugs
"Salavessa, Joao (Senior Developer)" <Joao.Salavessa@sky.uk> writes:
> In PostgreSQL 14.7 (AWS RDS) the “IF EXISTS” seems to be ignored for the “ALTER TABLE” statement.
> Example – the query “ALTER TABLE IF EXISTS dummy.relation DROP CONSTRAINT IF EXISTS dummy” (when schema dummy doesn’t
exist,or when schema dummy exists but relation doesn’t) works on 14.6 but fails in 14.7. 
> Few outputs below:

> ALTER TABLE IF EXISTS dummy.relation DROP CONSTRAINT IF EXISTS dummy  -- running in PostgreSQL 14.6
> NOTICE:  relation "relation" does not exist, skipping
> OK

It still works like that for me in 14.latest.  Perhaps you installed an
event trigger that is doing something incautious?

            regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: BUG #17809: MERGE ... UPDATE fails with BEFORE ROW UPDATE trigger when target row updated concurrently
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17827: Rule on insert into table doesn't work when excepting select from the table itself