| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера