pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedProbable error on docs
2+ messages / 2 participants
[nested] [flat]
* Probable error on docs
@ 2000-12-18 15:45 Steve Howe <howe@carcass.dhs.org>
0 siblings, 1 reply; 2+ messages in thread
From: Steve Howe @ 2000-12-18 15:45 UTC (permalink / raw)
To: pgsql-docs
Hi Folks,
At programmer\rules1139.htm, (Rules on INSERT, UPDATE and DELETE),
there are the following statments:
CREATE TABLE shoelace_log (
sl_name char(10), -- shoelace changed
sl_avail integer, -- new available value
log_who name, -- who did it
log_when datetime -- when
);
CREATE RULE log_shoelace AS ON UPDATE TO shoelace_data
WHERE NEW.sl_avail != OLD.sl_avail
DO INSERT INTO shoelace_log VALUES (
NEW.sl_name,
NEW.sl_avail,
getpgusername(),
'now'::text
);
In the RULE statment (the second one) there is a reference to a
[shoelace_data] relation. Shouldn't it be the name of the table just
created, [shoelace_log] ?
In the RULE statment there is also a refernce to [shoelace_log].
I'm using the docs from the last snapshot. Files are dated 05/08/2000.
Best Regards,
Howe.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Probable error on docs
@ 2000-12-20 02:52 Bruce Momjian <pgman@candle.pha.pa.us>
parent: Steve Howe <howe@carcass.dhs.org>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2000-12-20 02:52 UTC (permalink / raw)
To: Steve Howe <howe@carcass.dhs.org>; +Cc: pgsql-docs
I think the docs are correct. showlace_log holds changes to
shoelace_data.
> Hi Folks,
>
>
> At programmer\rules1139.htm, (Rules on INSERT, UPDATE and DELETE),
> there are the following statments:
>
> CREATE TABLE shoelace_log (
> sl_name char(10), -- shoelace changed
> sl_avail integer, -- new available value
> log_who name, -- who did it
> log_when datetime -- when
> );
>
> CREATE RULE log_shoelace AS ON UPDATE TO shoelace_data
> WHERE NEW.sl_avail != OLD.sl_avail
> DO INSERT INTO shoelace_log VALUES (
> NEW.sl_name,
> NEW.sl_avail,
> getpgusername(),
> 'now'::text
> );
>
> In the RULE statment (the second one) there is a reference to a
> [shoelace_data] relation. Shouldn't it be the name of the table just
> created, [shoelace_log] ?
> In the RULE statment there is also a refernce to [shoelace_log].
> I'm using the docs from the last snapshot. Files are dated 05/08/2000.
>
>
> Best Regards,
> Howe.
>
>
>
>
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-12-20 02:52 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-12-18 15:45 Probable error on docs Steve Howe <howe@carcass.dhs.org>
2000-12-20 02:52 ` Bruce Momjian <pgman@candle.pha.pa.us>
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