Created
February 3, 2020 11:54
-
-
Save monadplus/d6e4a76fbde1571498bed31af562dac7 to your computer and use it in GitHub Desktop.
PostgreSQL: functions don't hold static references to the objects.
This file contains hidden or 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 a (isOk BOOLEAN not null); | |
CREATE or replace FUNCTION get_isOk ( ) | |
returns BOOLEAN as $$ | |
select isOk from faa; | |
$$ LANGUAGE SQL; | |
drop table a; | |
-- select get_isOk(); -- now fails | |
create table a (isOk BOOLEAN not null); | |
select get_isOk(); -- works! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment