Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2016
    Posts
    1

    Unanswered: Inline comment in VIEW Sql definition

    PostgreSQL does not allow to strore inline comments in view's SQL definition, because the CREATE VIEW statement is parsed, and then analyzed to see what table and other database objects are referenced, and then the analyzed parse-tree is saved.

    However in our application we have designed one process which uses the tags that we mention within comments as part of CREATE VIEW definition.
    Things were going on good in Oracle database as it stored inline comments also. During migration we are unable to port one of our functionality which have dependency on comments in View in Postgres it didn't save the comments.

    Do we have anyway to get the actual VIEW text in Postgres db.

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    try

    Code:
    Select v.* from information_schema.Views v
    where v.table_name = 'YourViewName' and v.table_schema= 'YourSchemaName'
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •