On 2023-11-25 10:49:56 -0500, Ron Johnson wrote:
> On Sat, Nov 25, 2023 at 4:49 AM Peter J. Holzer wrote:
> On 2023-11-24 13:06:45 -0500, Ron Johnson wrote:
> > On Fri, Nov 24, 2023 at 1:01 PM Peter J. Holzer
> wrote:
> > On 2023-11-20 22:03:06 -0500, Ron Johnson wrote:
> >
On 11/25/23 11:21, Davin Shearer wrote:
Hello!
I'm trying to emit a JSON aggregation of JSON rows to a file using COPY
TO, but I'm running into problems with COPY TO double quoting the
output. Here is a minimal example that demonstrates the problem I'm
having:
I have tried to get COPY
On Sat, Nov 25, 2023 at 12:22 PM Davin Shearer
wrote:
>
> Is there a way to emit JSON results to file from within postgres?
>
Use psql to directly output query results to a file instead of using COPY
to output structured output in a format you don't want.
David J.
Hello!
I'm trying to emit a JSON aggregation of JSON rows to a file using COPY TO,
but I'm running into problems with COPY TO double quoting the output.
Here is a minimal example that demonstrates the problem I'm having:
create table public.tbl_json_test (id int, t_test text);
-- insert text
På lørdag 25. november 2023 kl. 17:08:28, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>:
Andreas Joseph Krogh writes:
> -- This works, but I'd rather not do the extra EXISTS
> select * from test t
> WHERE (NOT ARRAY ['x', 'y', 'z', 't']::varchar[] <@ (select array_agg(s.v)
from
> stuffs WHERE
Not sure you need to use array why not simple table joins, so a table with
your criteria x y z t joined to stuff to give you candidates that do match,
then left join with coalesce to add the 'd'
select
--a.id,b.test_id,
coalesce(a.id,b.test_id) as finalresult
from test a
left join (
select
Andreas Joseph Krogh writes:
> -- This works, but I'd rather not do the extra EXISTS
> select * from test t
> WHERE (NOT ARRAY ['x', 'y', 'z', 't']::varchar[] <@ (select array_agg(s.v)
> from
> stuffs WHERE s.test_id = t.id)
> OR NOT EXISTS (
> select * from stuff s where s.test_id = t.id
> )
>
On Sat, Nov 25, 2023 at 4:49 AM Peter J. Holzer wrote:
> On 2023-11-24 13:06:45 -0500, Ron Johnson wrote:
> > On Fri, Nov 24, 2023 at 1:01 PM Peter J. Holzer
> wrote:
> > On 2023-11-20 22:03:06 -0500, Ron Johnson wrote:
> > > Or row level security.
> >
> > Does that help here? AIUI
Hi, I'm testing if some dataset contains an array of elements and want to
return all “not containing the specified array”, including entries in master
table not being referenced.
I have the following schema:
drop table if exists stuff;
drop table if exists test;
CREATE TABLE test(
id
> -Original Message-
> From: Tom Lane
> Sent: Friday, November 24, 2023 6:44 PM
> To: Zahir Lalani
> Cc: Ron Johnson ; pgsql-
> generallists.postgresql.org
> Subject: Re: Odd Shortcut behaviour in PG14
>
> OK, so if this is a plpgsql function and ekey is a function variable, the
>
On 2023-11-24 13:06:45 -0500, Ron Johnson wrote:
> On Fri, Nov 24, 2023 at 1:01 PM Peter J. Holzer wrote:
> On 2023-11-20 22:03:06 -0500, Ron Johnson wrote:
> > Or row level security.
>
> Does that help here? AIUI row level security can be used to limit access
> to specific rows
11 matches
Mail list logo