Re: Identifying Schema-Qualified Sequence References in Column Defaults

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Identifying Schema-Qualified Sequence References in Column Defaults
Дата
Msg-id 1209719.1761187210@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Identifying Schema-Qualified Sequence References in Column Defaults  (jiaoshuntian@highgo.com)
Список pgsql-hackers
jiaoshuntian@highgo.com.w.kunlunaq.com writes:
> I'd like to bring attention to a metadata visibility issue when multiple schemas contain sequences with identical
names,and a table column references one of them via nextval(). Currently, there appears to be no reliable way to
determinewhich schema's sequence is actually referenced through system catalogs or views. 

The documented behavior of type regclass is that it schema-qualifies
the output name if the table/sequence/whatever would not be found by
searching the current search_path.  If you want something more
predictable, you could "set search_path = pg_catalog" before
inspecting the system catalogs.

            regards, tom lane



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