# HG changeset patch # User Adam Chlipala # Date 1298666789 18000 # Node ID 58c9c039582a3a94763633ed2f5b670298e67ed3 # Parent 541673c3161dbb35f103302930f1766e0accca0d Deal with Postgres's wonky type-changing for nullable columns of views diff -r 541673c3161d -r 58c9c039582a src/postgres.sml --- a/src/postgres.sml Fri Feb 25 11:27:16 2011 -0500 +++ b/src/postgres.sml Fri Feb 25 15:46:29 2011 -0500 @@ -75,9 +75,13 @@ String.concat ["(column_name = 'uw_", CharVector.map Char.toLower (ident x), - "' AND data_type = '", - p_sql_type_base t, - "'", + (case p_sql_type_base t of + "bigint" => + "' AND data_type IN ('bigint', 'numeric')" + | t => + String.concat ["' AND data_type = '", + t, + "'"]), if checkNullable then (" AND is_nullable = '" ^ (if isNotNull t then