aboutsummaryrefslogtreecommitdiff
path: root/contrib/spi/preprocessor/example.sql
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-05-10 15:12:29 +0000
committerBruce Momjian <bruce@momjian.us>1999-05-10 15:12:29 +0000
commitd489fdfc7f4ccf0010fe0397e7272bdfc257e8f2 (patch)
tree085a81e0c91d2ec1b59a56b4876f3c4905388238 /contrib/spi/preprocessor/example.sql
parent9e4e33c996b6027391f2cf8b1e47d75c3e5a8c23 (diff)
downloadpostgresql-d489fdfc7f4ccf0010fe0397e7272bdfc257e8f2.tar.gz
postgresql-d489fdfc7f4ccf0010fe0397e7272bdfc257e8f2.zip
I send you a attach of my modified refint.c that
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
Diffstat (limited to 'contrib/spi/preprocessor/example.sql')
-rw-r--r--contrib/spi/preprocessor/example.sql37
1 files changed, 37 insertions, 0 deletions
diff --git a/contrib/spi/preprocessor/example.sql b/contrib/spi/preprocessor/example.sql
new file mode 100644
index 00000000000..7ecd6ad7e5c
--- /dev/null
+++ b/contrib/spi/preprocessor/example.sql
@@ -0,0 +1,37 @@
+-- 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 --
+);
+