Re: generate_series for timestamptz and time zone problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: generate_series for timestamptz and time zone problem
Date: 2022-06-14 13:43:03
Message-ID: 38924.1655214183@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?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).

> Therefore, should I add a second function timestamptz_pl_interval with
> three arguments, or should a function with a different name be added so
> that it does not get confused with operator functions (which only have
> two arguments)?

That's where you get into beauty-is-in-the-eye-of-the-beholder
territory. There's some value in naming related functions alike,
but on the other hand I doubt timestamptz_pl_interval would have
been named so verbosely if anyone expected it to be called by
name rather than via an operator. Coming up with good names is
part of the work of preparing a patch like this.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2022-06-14 14:30:06 Re: PG15 beta1 fix pg_stats_ext/pg_stats_ext_exprs view manual
Previous Message Przemysław Sztoch 2022-06-14 13:18:07 Re: generate_series for timestamptz and time zone problem