X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F46xml-to-pg.t;h=61a354d00c788fa6558a153074e2db67b78f3083;hb=6dd07624218b4ad54e85cb5ca7796fd0d2f9d420;hp=e1796df5675f3da189dd78a7b3f56f78e0482c61;hpb=c3bddac946a236e1876c6cc414adc01c5ab8694a;p=dbsrgits%2FSQL-Translator.git diff --git a/t/46xml-to-pg.t b/t/46xml-to-pg.t index e1796df..61a354d 100644 --- a/t/46xml-to-pg.t +++ b/t/46xml-to-pg.t @@ -44,10 +44,11 @@ CREATE TABLE "Basic" ( "explicitemptystring" character varying DEFAULT '', -- Hello emptytagdef "emptytagdef" character varying DEFAULT '', - "another_id" integer DEFAULT '2', + "another_id" integer DEFAULT 2, "timest" timestamp, PRIMARY KEY ("id"), - CONSTRAINT "emailuniqueindex" UNIQUE ("email") + CONSTRAINT "emailuniqueindex" UNIQUE ("email"), + CONSTRAINT "very_long_index_name_on_title_field_which_should_be_truncated_for_various_rdbms" UNIQUE ("title") ); CREATE INDEX "titleindex" on "Basic" ("title"); @@ -63,6 +64,14 @@ CREATE VIEW "email_list" ( "email" ) AS SELECT email FROM Basic WHERE (email IS NOT NULL) ; +DROP TRIGGER IF EXISTS foo_trigger; + +CREATE TRIGGER foo_trigger after insert ON Basic update modified=timestamp();; + +DROP TRIGGER IF EXISTS bar_trigger; + +CREATE TRIGGER bar_trigger before insert OR update ON Basic update modified2=timestamp();; + ALTER TABLE "Basic" ADD FOREIGN KEY ("another_id") REFERENCES "Another" ("id") DEFERRABLE;