út 15. 8. 2023 v 8:04 odesílatel Vik Fearing
napsal:
> On 8/15/23 07:53, Pavel Stehule wrote:
> > út 15. 8. 2023 v 7:48 odesílatel Vik Fearing
> > napsal:
> >
> >> On 8/14/23 15:37, Pavel Stehule wrote:
> >>> po 14. 8. 2023 v 15:09 odesílatel Erik Rijkers napsal:
> >>>
> >>> I think so this can
On 8/15/23 07:53, Pavel Stehule wrote:
út 15. 8. 2023 v 7:48 odesílatel Vik Fearing
napsal:
On 8/14/23 15:37, Pavel Stehule wrote:
po 14. 8. 2023 v 15:09 odesílatel Erik Rijkers napsal:
I think so this can be +/- 40 lines of C code
It seems to me like a good candidate for an extension.
út 15. 8. 2023 v 5:12 odesílatel jian he
napsal:
> \df jsonb_populate_record
> List of functions
>Schema | Name | Result data type | Argument data
> types | Type
>
> +---+--+---
út 15. 8. 2023 v 7:48 odesílatel Vik Fearing
napsal:
> On 8/14/23 15:37, Pavel Stehule wrote:
> > po 14. 8. 2023 v 15:09 odesílatel Erik Rijkers napsal:
> >
> >> Op 8/14/23 om 14:51 schreef Pavel Stehule:> po 14. 8. 2023 v 11:32
> >> odesílatel Alvaro Herrera
> >> > with proposed function I c
On 8/14/23 15:37, Pavel Stehule wrote:
po 14. 8. 2023 v 15:09 odesílatel Erik Rijkers napsal:
Op 8/14/23 om 14:51 schreef Pavel Stehule:> po 14. 8. 2023 v 11:32
odesílatel Alvaro Herrera
> with proposed function I can write
>
> select jsonb_populate_array(null:date[],
> '["2023-07-13"
On 8/14/23 15:47, Chapman Flack wrote:
On 2023-08-14 09:11, Erik Rijkers wrote:
, '$' returning date[]
I certainly like that syntax better.
It's not that the "here's a null to tell you the type I want"
is terribly unclear, but it seems not to be an idiom I have
seen a lot of in PostgreSQL b
\df jsonb_populate_record
List of functions
Schema | Name | Result data type | Argument data
types | Type
+---+--+-+--
pg_catalog | jsonb_populate_record | anyelement
po 14. 8. 2023 v 15:47 odesílatel Chapman Flack
napsal:
> On 2023-08-14 09:11, Erik Rijkers wrote:
> > , '$' returning date[]
>
> I certainly like that syntax better.
>
> It's not that the "here's a null to tell you the type I want"
> is terribly unclear, but it seems not to be an idiom I have
On 2023-08-14 09:11, Erik Rijkers wrote:
, '$' returning date[]
I certainly like that syntax better.
It's not that the "here's a null to tell you the type I want"
is terribly unclear, but it seems not to be an idiom I have
seen a lot of in PostgreSQL before now. Are there other places
it's c
po 14. 8. 2023 v 15:09 odesílatel Erik Rijkers napsal:
> Op 8/14/23 om 14:51 schreef Pavel Stehule:> po 14. 8. 2023 v 11:32
> odesílatel Alvaro Herrera
> > with proposed function I can write
> >
> > select jsonb_populate_array(null:date[],
> > '["2023-07-13","2023-07-14"]'::jsonb)
> >
> Not
Op 8/14/23 om 14:51 schreef Pavel Stehule:> po 14. 8. 2023 v 11:32
odesílatel Alvaro Herrera
> with proposed function I can write
>
> select jsonb_populate_array(null:date[],
> '["2023-07-13","2023-07-14"]'::jsonb)
>
Not yet committed, but outstanding
SQL/JSON patches (v11) will let you do:
sel
po 14. 8. 2023 v 11:32 odesílatel Alvaro Herrera
napsal:
> On 2023-Aug-14, Pavel Stehule wrote:
>
> > jsonb_populate_array(anyarray, jsonb) returns anyarray
> >
> > Usage:
> >
> > select jsonb_populate_array(null::text[],
> '["cust_full_name","cust_email"]')
>
> I don't understand what this does.
On 2023-Aug-14, Pavel Stehule wrote:
> jsonb_populate_array(anyarray, jsonb) returns anyarray
>
> Usage:
>
> select jsonb_populate_array(null::text[], '["cust_full_name","cust_email"]')
I don't understand what this does. Can you be more explicit?
--
Álvaro Herrera 48°01'N 7°57'
Hi
Now, there is no native functionality for conversion from json(b) value to
some array.
https://stackoverflow.com/questions/76894960/unable-to-assign-text-value-to-variable-in-pgsql/76896112#76896112
It should not be too hard to implement native function jsonb_populate_array
jsonb_populate_ar
14 matches
Mail list logo