mirror of
https://github.com/postgres/postgres.git
synced 2025-06-20 15:22:23 +03:00
config
contrib
array
btree_gist
chkpass
cube
dbase
dblink
earthdistance
findoidjoins
fulltextindex
fuzzystrmatch
intarray
ipc_check
isbn_issn
lo
mSQL-interface
mac
miscutil
mysql
noupdate
oid2name
oracle
pg_controldata
pg_dumplo
pg_logger
pg_resetxlog
pgbench
pgcrypto
pgstattuple
retep
rserv
rtree_gist
seg
spi
preprocessor
README.MAX
example.sql
step1.c
step1.e
step2.pl
Makefile
README.spi
autoinc.c
autoinc.example
autoinc.sql.in
insert_username.c
insert_username.example
insert_username.sql.in
moddatetime.c
moddatetime.example
moddatetime.sql.in
refint.c
refint.example
refint.sql.in
timetravel.c
timetravel.example
timetravel.sql.in
start-scripts
string
tips
tools
tsearch
userlock
vacuumlo
xml
Makefile
README
contrib-global.mk
doc
src
COPYRIGHT
GNUmakefile.in
HISTORY
INSTALL
Makefile
README
aclocal.m4
configure
configure.in
register.txt
works with a new policy in cascade mode . Please Read README.MAX . I do not know if you are the author of refint.c , but if not please tell me who is . Thank you ( excuse me for my bad english) . Massimo Lambertini massimo.lambertini@everex.it
38 lines
943 B
SQL
38 lines
943 B
SQL
-- Note the syntax is strict because i have no time to write better perl filter.
|
|
--
|
|
-- [blank] is 1 blank
|
|
-- at the end of an interesting line must be a [,] or [--]
|
|
-- [ending] must be a , or --
|
|
--
|
|
-- foreign[blank]key[blank]([blank]keyname,..,keyname[blank])[blank]references[blank]table[blank][ending]
|
|
--
|
|
-- step1.e < example.sql | step2.pl > foreign_key_triggers.sql
|
|
--
|
|
-- step1.e is a simple program that UPPERCASE ALL . I know that is simple implementing in Perl
|
|
-- bu i haven't time
|
|
|
|
|
|
CREATE TABLE
|
|
gruppo
|
|
(
|
|
codice_gruppo int4 NOT NULL,
|
|
descrizione varchar(32) NOT NULL
|
|
primary key ( codice_gruppo )
|
|
|
|
) ;
|
|
|
|
--
|
|
-- fa_parte : Appartenenza di una Azienda Conatto o Cliente ad un certo GRUPPO
|
|
--
|
|
|
|
CREATE TABLE
|
|
fa_parte
|
|
(
|
|
codice_gruppo int4 NOT NULL,
|
|
codice_contatto int4 NOT NULL,
|
|
|
|
primary key ( codice_gruppo,codice_contatto ) ,
|
|
foreign key ( codice_gruppo ) references gruppo --
|
|
);
|
|
|