cartodb-postgresql/hook_on_table_create.sql
2013-10-22 16:19:58 +02:00

20 lines
490 B
PL/PgSQL

\i cartodb_hooks.sql
\set VERBOSITY terse
SET SESSION AUTHORIZATION 'development_cartodb_user_1';
SELECT session_user, current_user;
create schema c;
--create table c.t3(a int);
select 1 as i INTO c.t3;
select * from c.t3;
alter table c.t3 rename column the_geom_webmercator to webmerc;
select * from c.t3;
alter table c.t3 rename column the_geom_webmercator to webmerc2;
select * from c.t3;
alter table c.t3 drop column the_geom_webmercator;
select * from c.t3;
drop schema c cascade;