From: Brian Quinion Date: Fri, 10 Jun 2011 13:41:51 +0000 (+0000) Subject: bigint update script X-Git-Tag: v2.0.0~132 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/adb0b6ae1e511d8f65b54daeb4eff12def18dfaa bigint update script --- diff --git a/sql/update_bigint.sql b/sql/update_bigint.sql new file mode 100644 index 00000000..9cc0fffb --- /dev/null +++ b/sql/update_bigint.sql @@ -0,0 +1,9 @@ +\a +\t +\o /tmp/bigintupdate.sql +select 'alter table "'||relname||'" alter '||attname||' type bigint;' from pg_attribute join pg_class on +(attrelid = oid) where attname like '%place_id%' and attnum > 0 and relkind = 'r'::"char" and atttypid = 23 +and not relname::text ~ '^.*_[0-9]+$' order by 'alter table "'||relname||'" alter '||attname||' type +bigint;'; +\o +\i /tmp/bigintupdate.sql