pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Views and rules section (link provided below)
3+ messages / 2 participants
[nested] [flat]

* Views and rules section (link provided below)
@ 2005-01-27 04:47 Rob LoPresti <mooingyak@yahoo.com>
  2005-01-27 14:47 ` Re: Views and rules section (link provided below) Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Rob LoPresti @ 2005-01-27 04:47 UTC (permalink / raw)
  To: pgsql-docs

On the page:
http://borg.postgresql.org/docs/8.0/static/rules-views.html

Is the text (very close to the top):

---------
 Views in PostgreSQL are implemented using the rule
system. In fact, there
is essentially no difference between

CREATE VIEW myview AS SELECT * FROM mytab;

compared against the two commands

CREATE TABLE myview (same column list as mytab);
CREATE RULE "_RETURN" AS ON SELECT TO myview DO
INSTEAD
    SELECT * FROM mytab;
----------

I did this the second way (actually using 7.3.4, but
the documentation is
nearly identical), and as I'm still a little new to
postgres, I created my
table with foreign key restraints, which works, but
causes problems if you
want to drop the view.  I searched for a workaround on
google, and found the
following bug report:

http://archives.postgresql.org/pgsql-bugs/2003-09/msg00134.php

which received this reply:

http://archives.postgresql.org/pgsql-bugs/2003-09/msg00135.php

If it's unsupported, okay, no big deal, I won't do
that anymore, but the
exact detail that Tom Lane's response says is
unsupported is the same as the
above example taken straight from the manual.  I don't
claim to know the
best way to rewrite the section, but I'd like to put
forward the suggestion
that it not use any unsupported examples.

Thank you for your consideration,
-Rob




		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Views and rules section (link provided below)
  2005-01-27 04:47 Views and rules section (link provided below) Rob LoPresti <mooingyak@yahoo.com>
@ 2005-01-27 14:47 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2005-01-27 14:47 UTC (permalink / raw)
  To: Rob LoPresti <mooingyak@yahoo.com>; +Cc: pgsql-docs

Rob LoPresti <mooingyak@yahoo.com> writes:
> ... I don't claim to know the best way to rewrite the section, but I'd
> like to put forward the suggestion that it not use any unsupported
> examples.

The example *as written* works fine.  Doing other stuff in between the
two steps (such as loading data into the table) isn't supported, but
pointing that out in the rules discussion seems like distracting
pedantism, rather than information that's helpful right at that point.

Can you think of another place it'd be worth mentioning?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Views and rules section (link provided below)
@ 2005-01-28 06:39 Rob LoPresti <mooingyak@yahoo.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Rob LoPresti @ 2005-01-28 06:39 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-docs

Rob LoPresti <mooingyak@yahoo.com> writes:
> > ... I don't claim to know the best way to rewrite
the section, but I'd
> > like to put forward the suggestion that it not use
any unsupported
> > examples.

> The example *as written* works fine.  Doing other
stuff in between the
> two steps (such as loading data into the table)
isn't supported, but
> pointing that out in the rules discussion seems like
distracting
> pedantism, rather than information that's helpful
right at that point.

I made my previous post because I originally had the
mistaken assumption
that adding foreign key restraints was actually a
necessary step (in
retrospect, with a better grasp of the concepts, that
seems very silly).
While the language is clearer in the 8.0 manual (same
column list as mytab)
than in the 7.3 manual (same attribute list as for
mytab), I felt that it
might benefit from a simple warning to the effect that
*only* the columns,
and nothing else (like indexes, triggers, etc) should
be included.  I can
accept that this might be overly pedantic, but my goal
here is to prevent
someone else from making my mistake.  I have not yet
covered enough of the
manual to suggest a different place where this warning
might be appropriate,
so I regretfully can't offer any ideas on that front.

Thanks,
-Rob



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-01-28 06:39 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-27 04:47 Views and rules section (link provided below) Rob LoPresti <mooingyak@yahoo.com>
2005-01-27 14:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-01-28 06:39 Re: Views and rules section (link provided below) Rob LoPresti <mooingyak@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox