Re: generate_series for timestamptz and time zone problem

From: Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: generate_series for timestamptz and time zone problem
Date: 2022-06-14 19:46:26
Message-ID: 4e57ff10-bf22-ae58-74c2-93c696450eae@sztoch.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote on 14.06.2022 15:43:
> =?UTF-8?Q?Przemys=c5=82aw_Sztoch?= <przemyslaw(at)sztoch(dot)pl> writes:
>> Please let me know what is the convention (procedure) of adding new
>> functions to pg_proc. Specifically how oid is allocated.
> See
> https://www.postgresql.org/docs/devel/system-catalog-initial-data.html#SYSTEM-CATALOG-OID-ASSIGNMENT
> (you should probably read that whole chapter for context).
Thx.

There is another patch.
It works, but one thing is wrongly done because I lack knowledge.

Where I'm using DirectFunctionCall3 I need to pass the timezone name,
but I'm using cstring_to_text and I'm pretty sure there's a memory leak
here. But I need help to fix this.
I don't know how best to store the timezone in the generate_series
context. Please, help.
--
Przemysław Sztoch | Mobile +48 509 99 00 66

Attachment Content-Type Size
generate_series_with_timezone.patch text/plain 8.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2022-06-14 20:21:48 Re: Small TAP improvements
Previous Message Peter Geoghegan 2022-06-14 19:24:57 Re: better page-level checksums