Skip to content

Instantly share code, notes, and snippets.

@4t4nner
Created March 3, 2023 02:35
Show Gist options
  • Save 4t4nner/d69feae58d46133f5c71ec94229613af to your computer and use it in GitHub Desktop.
Save 4t4nner/d69feae58d46133f5c71ec94229613af to your computer and use it in GitHub Desktop.
CREATE OR REPLACE FUNCTION public.get_data_jsonb(prod_t product_template)
RETURNS jsonb
LANGUAGE sql
STABLE
AS $function$
SELECT convert_from(prod_t.data, 'UTF-8')::jsonb
$function$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment