PL/pgSQL compatibility? - Mailing list pgsql-general

From Soma Interesting
Subject PL/pgSQL compatibility?
Date
Msg-id 5.0.0.25.0.20001208130016.00bd4008@pop.telus.net
Whole thread Raw
In response to Re: Databases for Linux  ("Robert B. Easter" <reaster@comptechnews.com>)
Responses Re: PL/pgSQL compatibility?
List pgsql-general
I'm looking to join the camp of people who believe data logic should be
handled within the database(postgreSQL) and not the client code(php).   I
realize there are pros and cons to this approach but its something I want
to explore and be able to take advantage of where applicable. However most
of the elements involved in doing this I know little about, ie: stored
procedures, triggers, referential integrity, constraints, etc.

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.

  .      .       .       .

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

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.

So, if someone can point me towards some additional information on this,
that'd be appreciated.

.       .       .       .

Furthermore, my need for information on this topic will obviously goes
beyond this one issue - can someone recommend either an on-line resource to
advanced data modelling and / or database design or books worth purchasing
on the topic.


Summary of questions:

1) How cross database is PL/pgSQL?
2) How to define foreign -> primary key relationship where foreign key
records are deleted
3) recommended readings on any of the above.



-          -          -          -          -          -          -
  -          -          -          -          -
WARNING: Some experts believe that use of any keyboard may cause serious
injury.
Consult Users Guide.
                                                                                                   dfunct@telus.net


pgsql-general by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: pgsql and C++ compiling question
Next
From: Soma Interesting
Date:
Subject: RE: PL/pgSQL compatibility?