Custom Column Data Type Values?
# help-and-questions
e
I want to setup an autogenerated ID for each of my table rows, however I'd like them to be in a certain format. Something like
FEXXXXXXXXXX
where X is an alphanumerical character. Is there a way I can put this as an expression in the Default Value?
g
https://stackoverflow.com/questions/29257284/how-to-create-alpha-numeric-sequences-in-postgresql I just googled
postgres create sequence for primary key with alphanumeric
there were many hits.
e
Yeah I've been reading these, just wondering how to get it into supabase
g
You use the SQL they show in the SQL editor. Of course with your column and table names. You might be able to enter it in the Table UI for default, but you would still need to set up the sequence in SQL. I really don't use the default option in the UI much except for null, or auth.uid() so not sure what all it can do versus altering the table in SQL.
e
Ahhh ok!"