Join Discord
Powered by
https://github.com/supabase/supabase/discussions/4...
# help
u
10000multiplier
01/13/2022, 10:33 PM
https://github.com/supabase/supabase/discussions/4974
k
ktosiek
01/13/2022, 10:37 PM
How are you merging the data from multiple tables? Could you add the type at that point?
u
10000multiplier
01/13/2022, 11:36 PM
@ktosiek
i could do it with some js in the client yes, just wondering if there is a neater solution
k
ktosiek
01/14/2022, 7:22 AM
You could also add a column with default = 'my-activity-type', or even use a virtual column (see
https://postgrest.org/en/stable/api.html#computed-columns
, you could have an
activity_type
function for each table that can be used as activity)
ktosiek
01/14/2022, 7:23 AM
the last one works because PostgreSQL supports function overloading - you can have different functions with same name, if the argument types differ
Previous
Next