From: | "Joel Burton" <jburton(at)scw(dot)org> |
---|---|
To: | Soma Interesting <dfunct(at)telus(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: PL/pgSQL compatibility? |
Date: | 2000-12-08 22:21:47 |
Message-ID: | 3A3118AB.26169.149880A@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 8 Dec 2000, at 13:35, Soma Interesting wrote:
> One con, I understand, would be ability to migrate to another DBMS. If
> I were to use PL/pgSQL for my stored procedures - is this language a
> standard across DBMS? I'm not expecting this since most DBMS can't
> seem to follow SQL standards with simple things like dates or
> wild-cards.
Oracle's PLSQL is very similar; Interbase's procedural language is
similar, but requires some rewriting. MS Access doesn't have
procedural languages (you can use VBA in forms, reports, but not
table operations.) MySQL does not have at all.
Or, of course, you could use plperl or pltcl for your PG procedural
stuff; I doubt other databases offer these as PLs, but, the code
(w/modifications) could live outside the server in some cases.
> Another, more specific question: I'd like to know how to make two
> tables in PostgreSQL with a relationship between them so that when the
> parent row is removed from one table, its children in the other table
> will also be removed by PostgreSQL. I don't even know how to specify
> the foreign key. :) Conceptually I understand (I believe). I'm just no
> sure how to define this within PostgreSQL
CREATE TABLE parent (id INT PRIMARY KEY);
CREATE TABLE child (id REFERENCES parent ON DELETE CASCADE);
> I've done some searching through the on-line postgreSQL manual -
in
> hopes to find a chapter in it akin to "referential integrity", but no
> such luck. Its possible I'm confusing the terminology.
I recently wrote a (draft) tutorial on referential integrity. If you go
to the PostgreSQL website & dig into the archives of the pgsql-doc
discussion list, you'll see it there from about 5 days ago.
--
Joel Burton, Director of Information Systems -*- jburton(at)scw(dot)org
Support Center of Washington (www.scw.org)
From | Date | Subject | |
---|---|---|---|
Next Message | Trond Eivind =?iso-8859-1?q?Glomsr=d8d?= | 2000-12-08 23:20:06 | Re: pgsql and C++ compiling question |
Previous Message | Soma Interesting | 2000-12-08 22:18:27 | RE: PL/pgSQL compatibility? |