"David G. Johnston" writes:
> On Wed, Jul 19, 2017 at 8:53 PM, Guyren Howe wrote:
>> Thanks. Seeking greater understanding, why is json_agg(*) not equivalent?
> Are you referring to the fact that this provokes an error?
> "select json_agg(*) from schemata;"
The reason for that is that we inte
On Wed, Jul 19, 2017 at 8:53 PM, Guyren Howe wrote:
> Thanks. Seeking greater understanding, why is json_agg(*) not equivalent?
>
Are you referring to the fact that this provokes an error?
"select json_agg(*) from schemata;"
The json_agg(expression) function has an arity of 1 (i.e., one inpu
On Jul 19, 2017, at 20:47 , Paul Jungwirth
wrote:
>
>> which is great. I have an array of perfect JSON objects. Now I just need
>> to turn that into a single JSON object.
>
> I think you're saying you want it as a single JSON *array*, right? An object
> of objects doesn't make sense. Assuming
which is great. I have an array of perfect JSON objects. Now I just need
to turn that into a single JSON object.
I think you're saying you want it as a single JSON *array*, right? An
object of objects doesn't make sense. Assuming that's right, this seems
to work:
db1=# select json_agg(schema
Guyren Howe writes:
> I have an array of perfect JSON objects. Now I just need to turn that into a
> single JSON object. But when I do the obvious:
> SELECT array_to_json(
> SELECT
> ARRAY_AGG(foo) AS foos
> FROM (
> SELECT
9.6
I’ve a view that shows information about schemas:
SELECT schemata.catalog_name,
schemata.schema_name,
('/'::text || (schemata.schema_name)::text) AS schema_name_address
FROM information_schema.schemata
ORDER BY schemata.catalog_name, schemata.schema_name
Fine. I now want to tur