Re: Get original view definition without modification

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Get original view definition without modification
Дата
Msg-id 10395.1590764802@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Get original view definition without modification  (PG Doc comments form <noreply@postgresql.org>)
Список pgsql-docs
PG Doc comments form <noreply@postgresql.org> writes:
> I am looking a way to get exact view definition, for ex :
> ...
> I am fine with adding tablename before columnname but i don't want the extra
> '::text' part. Is there anyway to achieve this(like any other system table i
> can query from to get original definition)

No, Postgres only saves a "compiled" form of a view.  Storing the original
text would have its own pitfalls, eg what if you rename a table or column
mentioned in the view?  (Also, the SQL standard has some requirements that
would be difficult to meet otherwise.)

If you really want the original text, best bet is to keep your schema
creation commands in a VCS or the like, outside the database.

            regards, tom lane



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

Предыдущее
От: p.luzanov@postgrespro.ru
Дата:
Сообщение: Re: max_wal_size
Следующее
От: PG Doc comments form
Дата:
Сообщение: Minor result error in binary strings documentation