]> git.openstreetmap.org Git - nominatim.git/blob - sql/update_bigint.sql
go through entire member list when checking waterway relations
[nominatim.git] / sql / update_bigint.sql
1 \a
2 \t
3 \o /tmp/bigintupdate.sql
4 select 'alter table "'||relname||'" alter '||attname||' type bigint;' from pg_attribute join pg_class on 
5 (attrelid = oid) where attname like '%place_id%' and attnum > 0 and relkind = 'r'::"char" and atttypid = 23 
6 and not relname::text ~ '^.*_[0-9]+$' order by 'alter table "'||relname||'" alter '||attname||' type 
7 bigint;';
8 \o
9 \i /tmp/bigintupdate.sql