Re: Bug in RENAME TO?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug in RENAME TO?
Дата
Msg-id 26739.1087063349@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug in RENAME TO?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Bug in RENAME TO?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
I said:
> It's likely that there are some pg_proc entries that you can break the
> system beyond repair by renaming, but I'd expect they are a relatively
> small minority (the system's hardwired references are by OID not name).

Just for fun I tried

d=# update pg_proc set proname = 'z' || proname;
UPDATE 1727

The database got a bit unpleasant to use, mainly because most of
psql's \d commands broke:

d=# \d foo
ERROR:  function pg_catalog.pg_table_is_visible(oid) does not exist

but standard SQL operations still worked, and in fact I was able to
undo the damage with

d=# update pg_proc set proname = zsubstring(proname,2);
UPDATE 1727

So I say there isn't any reason to prohibit renaming functions just
because they were created at initdb time.  The worst-case scenario
is you have to rename 'em back.  Likewise for ALTER OWNER.
        regards, tom lane


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Nested xacts: looking for testers and review
Следующее
От: "Carl E. McMillin"
Дата:
Сообщение: Re: I just got it: PostgreSQL Application Server -- a new project.