Created
April 18, 2019 14:50
-
-
Save sahapasci/e766d2c2a0c2521ebb73e89ede971e84 to your computer and use it in GitHub Desktop.
postgresql 9.6 alter column type which used in function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table my_table (id integer primary key, data text); | |
create function my_func(id integer, data text) | |
returns void | |
language plpgsql | |
as | |
$$ | |
begin | |
insert into my_table values (id, data); | |
end; | |
$$; | |
select my_func (10, 'asdf'); | |
alter table my_table alter column id type bigint; | |
\d my_table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment