From 0c22cce30b10c3e233fc165f38bbffeffc7957e6 Mon Sep 17 00:00:00 2001 From: lucianobotti <53790312+lucianobotti@users.noreply.github.com> Date: Fri, 24 May 2024 14:45:42 -0300 Subject: [PATCH] Update sequences.mdx Suggesting a fix for the query ( needs to use jsonb instead of json and is missing an ending ')' --- product_docs/docs/pgd/5/sequences.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product_docs/docs/pgd/5/sequences.mdx b/product_docs/docs/pgd/5/sequences.mdx index 12da76b6fbe..a588a03668f 100644 --- a/product_docs/docs/pgd/5/sequences.mdx +++ b/product_docs/docs/pgd/5/sequences.mdx @@ -304,10 +304,10 @@ the next value. ```sql -- determine highest sequence value across all nodes SELECT max((x->'response'->'command_tuples'->0->>'nextval')::bigint) - FROM json_array_elements( + FROM jsonb_array_elements( bdr.run_on_all_nodes( E'SELECT nextval(\'public.sequence\');' - )::jsonb AS x; + )::jsonb) AS x; -- turn into a galloc sequence SELECT bdr.alter_sequence_set_kind('public.sequence'::regclass, 'galloc', $MAX + $MARGIN);