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

Поиск
Список
Период
Сортировка
От laurie.burrow@powerconv.alstom.com
Тема Re: Possible problem with pg_get_viewdef on Postgres V8.0.0 rc4
Дата
Msg-id OFD032F062.B61D1735-ON80256F88.005E2745-80256F88.005F08B0@transport.alstom.com
обсуждение исходный текст
Ответ на Possible problem with pg_get_viewdef on Postgres V8.0.0 rc4  (laurie.burrow@powerconv.alstom.com)
Ответы Re: Possible problem with pg_get_viewdef on Postgres V8.0.0 rc4  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: rc4 and rc3, some deleted, but still needed text in the
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Possible problem with pg_get_viewdef on Postgres V8.0.0 rc4