© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
1 reply
beroer

Can't change column uuid back from type text to type uuid

i kept getting the error (on the server)
invalid input syntax for type uuid: "undefined"
invalid input syntax for type uuid: "undefined"
when updating a row in a table.

so i tried to change the type of my
uuid
uuid
column from
uuid
uuid
to
text
text
, hoping it'd solve it. i realized i lose the
gen_random_uuid()
gen_random_uuid()
function that way, so i wanted to change it back... only that i can't change it back now. not with the UI (table editor) and i can't figure out the right sql query with the help of the ai either (sql editor).

table editor problem: i select uuid from the types, and
gen_random_uuid()
gen_random_uuid()
from default value, i click save, the spinning wheel appears for ~300ms, then it disappears, and the column editing sidebar doesn't disappear, so i'm stuck with it not changing.

sql editor problem:
alter table draft
alter column uuid
type uuid using uuid::uuid
alter table draft
alter column uuid
type uuid using uuid::uuid

for this query i get:
ERROR:  42804: default for column "uuid" cannot be cast automatically to type uuid
ERROR:  42804: default for column "uuid" cannot be cast automatically to type uuid


and i can't go forward. i don't really know where
invalid input syntax for type uuid: "undefined"
invalid input syntax for type uuid: "undefined"
is coming from.
supabase_ui.gif
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Change Identify Type Column from starting from 1
SupabaseSSupabase / help-and-questions
4y ago
Update user id from text to uuid
SupabaseSSupabase / help-and-questions
3y ago
Can't filter by uuid...
SupabaseSSupabase / help-and-questions
4y ago
How to change the type of my id column
SupabaseSSupabase / help-and-questions
4y ago