Add parenthesis into the VIEW definition to make sure the pg parser still can deal...
[dbsrgits/SQL-Translator.git] / t / 46xml-to-pg.t
index c38d917..44ef2ad 100644 (file)
@@ -39,7 +39,7 @@ CREATE TABLE "Basic" (
   "id" serial NOT NULL,
   "title" character varying(100) DEFAULT 'hello' NOT NULL,
   "description" text DEFAULT '',
-  "email" character varying(255),
+  "email" character varying(500),
   "explicitnulldef" character varying,
   "explicitemptystring" character varying DEFAULT '',
   -- Hello emptytagdef
@@ -59,7 +59,7 @@ CREATE TABLE "Another" (
 
 DROP VIEW "email_list";
 CREATE VIEW "email_list" ( "email" ) AS (
-    SELECT email FROM Basic WHERE email IS NOT NULL
+    SELECT email FROM Basic WHERE (email IS NOT NULL)
   );
 
 ALTER TABLE "Basic" ADD FOREIGN KEY ("another_id")