Re: pg_views.definition - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_views.definition
Date
Msg-id 12166.1026826307@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_views.definition  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> It's really annoying when people save their view definition in phpPgAdmin
> and when they load it up again it's lost all formatting.  Functions and
> rules, for instance keep the original formatting somewhere.

Rules do not.  (A view is just a rule anyway.)

Functions do, but that's because their definition is entered as a text
string, which leads directly to those quoting headaches that you're
all too familiar with.

I've thought occasionally about improving the lexer so that parsetree
nodes could be tagged with the section of the source text they were
built from (probably in the form of a (start offset, end offset) pair).
This was mainly for use in improving error reporting in the
parse-analysis phase, but it might be useful for storing original source
text for rules too.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: bit type external representation
Next
From: Tom Lane
Date:
Subject: Re: [SQL] line datatype