From: | Greg Sabino Mullane <htamfids(at)gmail(dot)com> |
---|---|
To: | csanyipal(at)gmail(dot)com |
Cc: | general pgsql <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: ERROR: stack depth limit exceeded |
Date: | 2025-02-19 14:31:33 |
Message-ID: | CAKAnmmLoiQGtnL4is9LUEynM7MAO6_KkMYSjME_nTNuThR-Ehw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Not related to the main question, but that query could use a little
adjustment. Something like:
WITH x AS (
select kelt from javaink_forgalma
where en_kaptam is true and az_aru_neve = 'nyugdíjam'
order by kelt desc limit 2
)
,y AS (select min(kelt) from x)
,z AS (select max(kelt) from x)
INSERT INTO public.havonkenti_megtakaritasaink (ezen_idokozben,
megtakaritva_rsd, kelt)
VALUES (
(select tsrange(min,max,'[)') FROM y,z)
, (select sum(egysegar * ennyi_egyseg) from javaink_forgalma, y, z
where a_penzem = 'RSD' and kelt >= min and kelt < max)
, DEFAULT
);
Also, it's best to use "timestamp with time zone" NOT "timestamp without
time zone" whenever possible (i.e. timestamptz not timestamp)
Cheers,
Greg
--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2025-02-19 15:05:16 | Re: AW: PGDG PostgreSQL Debian package: Question on conditions for creation of new cluster |
Previous Message | Schmid Andreas | 2025-02-19 13:22:22 | AW: PGDG PostgreSQL Debian package: Question on conditions for creation of new cluster |