Help with Arrays and References

From: "William N(dot) Zanatta" <william(at)veritel(dot)com(dot)br>
To: pgsql-general(at)postgresql(dot)org
Subject: Help with Arrays and References
Date: 2002-06-24 17:57:13
Message-ID: 3D175D79.3050409@veritel.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm starting on PostgreSQL so please be patient; =]

I'm building a book library database in which I have a table
TBL_FORMAT which keeps basic information on various file-formats (ie 1,
PDF, Portable Document Format) and a TBL_BOOKS which I want to reference
TBL_FORMAT. But the column Format inside TBL_BOOKS is an array, as a
book may exist in one or more file types. My doubt is: If I make
something like

CREATE TABLE "tbl_books" (
"id_book" int4 DEFAULT nextval('TBL_Books_ID_Books_Seq'::text) NOT NULL,
"format" _int4 NOT NULL REFERENCES TBL_Format ON_UPDATE CASCADE,
...

will the CASCADE action update my TBL_Books (Format) keeping the
other values in the array or will it erase all and set the new Format value?

Thanks,

William

--
Perl combines all of the worst aspects of BASIC, C and line noise.
-- Keith Packard

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2002-06-24 18:02:48 Re: Blob like type
Previous Message Gregory Seidman 2002-06-24 17:49:12 Re: SQL server application porting headache