© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
8 replies
othelocold

Supabase default text value is set incorrectly

In my table I have a
version
version
column where I want a default value to be set to
1.0
1.0
of type text if version is not being set by user explicitly.

But when I put
1.0
1.0
for default and hit save it will convert to '1.0'::text
and then it save it like that as default. So in my db instead of version
1.0
1.0
it will be saved as
'1.0'::text
'1.0'::text


The value is not nullable, the type is text and default should only be
1.0
1.0


I tried to save it as
1
1
but it will be saved as
'1'::text
'1'::text
, also tried with setting it as
"1"
"1"
or
'1'
'1'
but then it will be saved as
'"1"'::text
'"1"'::text
or
''1''::text
''1''::text


How can I have it saved as
1.0
1.0
only?
Screenshot_2023-12-20_at_10.25.14.png
Screenshot_2023-12-20_at_10.25.35.png
Screenshot_2023-12-20_at_10.27.34.png
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

what is default value of $PGPASSWORD and how to set a value ?
SupabaseSSupabase / help-and-questions
4y ago
set the default value of a jsonbarray column
SupabaseSSupabase / help-and-questions
3y ago
Set url for supabase project
SupabaseSSupabase / help-and-questions
4y ago
Integrating Full Text Search with supabase
SupabaseSSupabase / help-and-questions
4y ago