\set VERBOSITY verbose
DROP TABLE IF EXISTS dblink_test;
CREATE TABLE dblink_test
(
	id SERIAL PRIMARY KEY,
	col1 INT NOT NULL DEFAULT 0,
	col1b INT NOT NULL DEFAULT 0
);

INSERT INTO dblink_test VALUES(default);

ALTER TABLE dblink_test
	DROP COLUMN col1,
	ADD COLUMN col2 VARCHAR(10) NOT NULL DEFAULT '',
	ADD COLUMN col3 INT NOT NULL DEFAULT 0;

SELECT * FROM
	dblink_build_sql_update('dblink_test', '1', 1, ARRAY[1::TEXT], ARRAY[1::TEXT]);
