Hacker News new | ask | show | jobs
by zcrackerz 2488 days ago
Also, try adding a value to an enum via ALTER TYPE ... ADD VALUE
1 comments

Not anymore ;). Well, at least in the upcoming PG 12.

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit...

  commit 212fab9926b2f0f04b0187568e7124b70e8deee5
  Author: Thomas Munro <tmunro@postgresql.org>
  Date:   2018-10-09 12:51:01 +1300
  
      Relax transactional restrictions on ALTER TYPE ... ADD VALUE (redux).
There's still some restrictions:

> This patch removes that restriction, and instead insists that an uncommitted enum value can't be referenced unless it belongs to an enum type created in the same transaction as the value.