Re: Getting json-value as varchar - Mailing list pgsql-general

From David G. Johnston
Subject Re: Getting json-value as varchar
Date
Msg-id CAKFQuwaRcrLBOMEb7ZNmW9_GCGARODRRtN3oOPMYLCex5MnT5g@mail.gmail.com
Whole thread Raw
In response to Re: Getting json-value as varchar  (Andreas Joseph Krogh <andreas@visena.com>)
Responses Re: Getting json-value as varchar  (Andreas Joseph Krogh <andreas@visena.com>)
List pgsql-general
On Thursday, January 6, 2022, Andreas Joseph Krogh <andreas@visena.com> wrote:

Apparently I'm after a solution which either casts this to varchar or a function that takes JSONB as argument and outputs the first field-value as varchar.
 

You can try casting the value though IIRC it doesn’t actually work (limitation of the feature).  The fact is that the ‘ - - > ‘ operator gives you the needed output.

David J.

pgsql-general by date:

Previous
From: Thomas Markus
Date:
Subject: Re: Getting json-value as varchar
Next
From: Andreas Joseph Krogh
Date:
Subject: Re: Getting json-value as varchar