Search code examples
postgresqltemporal-database

postgresql enum Temporal


i'm would like add value to the enum i use this query :

ALTER TYPE enum_missions_status ADD VALUE 'COMPLETED'

with my main table is sucess but when i try this query :

ALTER TYPE enum_historisationMissions_status ADD VALUE 'COMPLETED'

for my tempory table : https://wiki.postgresql.org/wiki/SQL2011Temporal

i have this error message :

Unhandled rejection SequelizeBaseError: type "enum_historisationmissions_status" does not exist

he modify my M to m.

whe i try :

 ALTER TYPE "enum_historisationMissions_status" ADD VALUE 'COMPLETED'

i have this error :

Unhandled rejection SequelizeBaseError: type "enum_historisationmissions_status" does not exist

How do i add enum to temporal table?


Solution

  • In general SQL is case insensitive. Thus enum_historisationMissions_status and enum_historisationmissions_status denote the same object. To avoid this behaviour you can include the name in double quoutes, e.g. "enum_historisationMissions_status" names an object with lower and upper characters.