Skip to content

Conversation

@chdsbd
Copy link
Collaborator

@chdsbd chdsbd commented Aug 25, 2022

No description provided.

let ok_sql = r#"
-- NON-VOLATILE
ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT 10;
ALTER TABLE "account" ADD COLUMN "last_modified" timestamptz DEFAULT now();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our code for checking volatility of functions doesn't work. now() is stable, while a function like random is volatile.

select
  proname,
  pronamespace::regnamespace,
  provolatile
from pg_proc
where proname = 'now'
  or proname = 'random';

I think we could hard code in a list of functions and then warn when we can't know for certain with a more detailed error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants