vendredi 28 novembre 2014

How use enum in postgres


Vote count:

0




i have created an enum type with postgress



CREATE TYPE myenum AS ENUM ('a', 'b', 'c', 'd');


I have create a store



CREATE OR REPLACE FUNCTION public.mystore(type myenum)


Now in the store procedure how i can check if a type is a or b like



if(type = myenum.a or type = myenum.b) then
...
end if;


infact the last line of code not working.



asked 43 secs ago







How use enum in postgres

Aucun commentaire:

Enregistrer un commentaire