Re: Possible problem with pg_get_viewdef on Postgres V8.0.0 rc4

From: laurie(dot)burrow(at)powerconv(dot)alstom(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Possible problem with pg_get_viewdef on Postgres V8.0.0 rc4
Date: 2005-01-13 17:16:34
Message-ID: OFD032F062.B61D1735-ON80256F88.005E2745-80256F88.005F08B0@transport.alstom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Tom Lane wrote:

> Could we see a full example? The view definition is of little use when
> you didn't provide the definitions of the tables it references.

Mea Culpa!

The view references prd, and rspper tables whose defintions are shown
below.

I've included the gennme table as it is referenced by prd, and the
nmeclss table as it is referenced by gennme

CREATE TABLE prd
(
slimprdmgrrspperid int4,
prdid int4 NOT NULL DEFAULT nextval('PrdPrdID_seq'::text),
slimprdnmgnnmeid int4 NOT NULL,
CONSTRAINT prdpk PRIMARY KEY (prdid),
CONSTRAINT gennmefk5 FOREIGN KEY (slimprdnmgnnmeid) REFERENCES gennme
(gennmeid) ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT rspperfk2 FOREIGN KEY (slimprdmgrrspperid) REFERENCES rspper
(rspperid) ON UPDATE CASCADE ON DELETE NO ACTION
)
WITH OIDS;

CREATE TABLE rspper
(
rspperid int4 NOT NULL DEFAULT nextval('RspPerRspPerID_seq'::text),
ctctnt text,
lstnme varchar(100) NOT NULL,
eml varchar(100),
frstnme varchar(100) NOT NULL,
addr varchar(200),
phn varchar(100),
mob varchar(100),
CONSTRAINT rspperpk PRIMARY KEY (rspperid),
CONSTRAINT rspperak1_uc2 UNIQUE (frstnme, lstnme, phn)
)
WITH OIDS;

CREATE TABLE gennme
(
gennmeid int4 NOT NULL DEFAULT nextval('GenNmeGenNmeID_seq'::text),
actvle varchar(200) NOT NULL,
lblloc varchar(1000),
catnmeclssid varchar(200) NOT NULL,
CONSTRAINT gennmepk PRIMARY KEY (gennmeid),
CONSTRAINT nmeclssfk1 FOREIGN KEY (catnmeclssid) REFERENCES nmeclss
(nmeclssid) ON UPDATE CASCADE ON DELETE NO ACTION
)

CREATE TABLE nmeclss
(
nmeclssid varchar(200) NOT NULL DEFAULT nextval
('NmeClssNmeClssID_seq'::text),
CONSTRAINT nmeclsspk PRIMARY KEY (nmeclssid)
)
WITH OIDS;

Regards
Laurie

:.________________
CONFIDENTIALITY : This e-mail and any attachments are confidential and
may be privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person, use
it for any purpose or store or copy the information in any medium.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2005-01-13 17:26:32 Re: rc4 and rc3, some deleted, but still needed text in the
Previous Message Alexander Rodrguez 2005-01-13 17:11:30 BUG #1396: Connection