On May 13, 5:37 pm, gsm...@gregsmith.com (Greg Smith) wrote:
> On Wed, 13 May 2009, Kevin Field wrote:
> > Or would the only way to do this be to actually create a view and then
> > call pg_get_viewdef() and then delete the view?
>
> Just make it a temporary view and then it drops when the session
On Wed, 13 May 2009, Kevin Field wrote:
Or would the only way to do this be to actually create a view and then
call pg_get_viewdef() and then delete the view?
Just make it a temporary view and then it drops when the session ends.
Here's a working shell example that transforms a view into the
On May 13, 12:52 pm, t...@sss.pgh.pa.us (Tom Lane) wrote:
> Kev writes:
> > ... I was surprised
> > to find that some of my views of the form:
> > select.from b left join a on a.id=b.id
> > ...were being translated to this:
> > SELECT..FROM (B LEFT JOIN a ON ((a.id = b.id)))
> > ..
On May 13, 12:41 pm, kevin.gritt...@wicourts.gov ("Kevin Grittner")
wrote:
> Kevin Field wrote:
> > One other thing I'm just curious about, "!=" gets replaced with
> > "<>"...how come? (Feels more VB-ish than C-ish, so I was surprised
> > that that would be the official/preferred reconstruct)
Kev writes:
> ... I was surprised
> to find that some of my views of the form:
> select.from b left join a on a.id=b.id
> ...were being translated to this:
> SELECT..FROM (B LEFT JOIN a ON ((a.id = b.id)))
> ...before being stored in the table pg_views is derived from. My
> su
Kevin Field wrote:
One other thing I'm just curious about, "!=" gets replaced with
"<>"...how come? (Feels more VB-ish than C-ish, so I was surprised
that that would be the official/preferred reconstruct)
<> is the official SQL standard notation for "not equals", AFAIK. != is not.
Kevin Field wrote:
> One other thing I'm just curious about, "!=" gets replaced with
> "<>"...how come? (Feels more VB-ish than C-ish, so I was surprised
> that that would be the official/preferred reconstruct)
"<>" is the SQL standard operator. "!=" is a PostgreSQL extension,
for the co
On May 13, 11:31 am, Kev wrote:
> Hi,
>
> I have a script that automatically generates the SQL to create some
> views. I'd like it to check whether its generated SQL matches the SQL
> returned by "select definition from pg_views where...". I've guessed
> most of the rules just by looking at the
Hi,
I have a script that automatically generates the SQL to create some
views. I'd like it to check whether its generated SQL matches the SQL
returned by "select definition from pg_views where...". I've guessed
most of the rules just by looking at the output, but I was surprised
to find that som