Re: encode/decode support for base64url

2025-03-10 Thread Przemysław Sztoch
ful (both from rfc4648), which doesn't have such problems: The resulting character set is all one case, which can often be beneficial when using a case-insensitive filesystem, DNS names, spoken language, or human memory. The result can be used as a file name because it cannot possibly cont

encode/decode support for base64url

2025-03-04 Thread Przemysław Sztoch
Hello, Sometimes support for base64url from RFC 4648 would be useful. Does anyone else need a patch like this? -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: UUID v7

2024-11-26 Thread Przemysław Sztoch
query for "uuidv7" does not return a bunch of other unnecessary functions related to UUIDv7. Thank you for pointing it out. How about gen_uuidv7() and gen_uuidv4() as we already have gen_random_uuid()? Regards, -- Przemysław Sztoch | Mobile +48 509 99 00 66

DROP VIEW name WITHOUT TYPE

2024-11-08 Thread Przemysław Sztoch
Is it possible to extend DROP VIEW command: DROP VIEW [ IF EXISTS ]/|name|/ [, ...] [ CASCADE | RESTRICT | WITHOUT TYPE] I want to allow to DROP VIEW if any objects depend on it. Am I right, If we leave (or convert) TYPE linked to VIEW, then DROP will be possible? -- Przemysław Sztoch

Re: date_trunc function in interval version

2024-05-20 Thread Przemysław Sztoch
your_table; Truncate to the Start of the Hour: # SELECT date_bin('1 hour', timestamp_column, '0001-01-01'::timestamp) FROM your_table; Truncate to the Start of the Minute: # SELECT date_bin('1 minute', timestamp_column, '0001-01-01'::timestam

Re: date_trunc function in interval version

2024-05-18 Thread Przemysław Sztoch
Robert Haas wrote on 5/15/2024 9:29 PM: On Mon, Mar 4, 2024 at 5:03 AM Przemysław Sztoch wrote: Apparently the functionality is identical to date_bin. When I saw date_bin in the documentation, I thought it solved all my problems. Unfortunately, DST problems have many corner cases. I tried to

Re: date_trunc function in interval version

2024-03-04 Thread Przemysław Sztoch
Tomas Vondra wrote on 18.02.2024 01:29: Hi, Please don't too-post on this list. The custom is to bottom-post or reply inline, and it's much easier to follow such replies. On 12/23/23 23:45, Przemysław Sztoch wrote: date_bin has big problem with DST. In example, if you put origin

Re: UUID v7

2024-01-25 Thread Przemysław Sztoch
? Does v13 address all open items? Maybe let’s compose better error message? +1 for erroring when ts is outside range. v13 looks good for me. I think we have reached a optimal compromise. -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: UUID v7

2024-01-18 Thread Przemysław Sztoch
5 00:00:00 UTC was 2022-02-22 19:22:22 UTC. And that was 2022-02-23 00:22:22 in UTC-05. Best regards, Andrey Borodin. -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: UUID v7

2024-01-18 Thread Przemysław Sztoch
nd since the time returned is in UTC, it should be timestamptz. -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: UUID v7

2024-01-18 Thread Przemysław Sztoch
eft: deal with timezones, improve documentation. Best regards, Andrey Borodin. [0] https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis#name-example-of-a-uuidv1-value -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: UUID v7

2024-01-16 Thread Przemysław Sztoch
imestampTz confusing. timstamptz internally always store UTC. I believe that in SQL, when operating with time in UTC, you should always use timestamptz. timestamp is theoretically the same thing. But internally it does not convert time to UTC and will lead to incorrect use. -- Przemysław Sztoch |

Re: UUID v7

2024-01-16 Thread Przemysław Sztoch
people use. -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: UUID v7

2024-01-16 Thread Przemysław Sztoch
ey Borodin. -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: Re: UUID v7

2024-01-02 Thread Przemysław Sztoch
ion gen_uuid_v7(timestamp). Nevertheless, the need for uuid v6/7/8 is very high and I'm glad it's coming to PostgreSQL. It should be a PG17 version. -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: date_trunc function in interval version

2023-12-23 Thread Przemysław Sztoch
, 15min, 10 min etc... John Naylor wrote on 23.12.2023 01:32: On Sat, Dec 23, 2023 at 5:26 AM Przemysław Sztoch wrote: In my opinion date_trunc is very good name. Truncated data is timestamp type, not interval. First parameter has same meaning in original date_trunc and in my new version. New

Re: date_trunc function in interval version

2023-12-22 Thread Przemysław Sztoch
odesílatel Przemysław Sztoch mailto:przemys...@sztoch.pl>> napsal: Hello. There is date_trunc(interval, timestamptz, timezone) function. First parameter can be '5 year', '2 month', '6 hour', '3 hour', '15 minute', '10 secon

date_trunc function in interval version

2023-12-22 Thread Przemysław Sztoch
Hello. There is date_trunc(interval, timestamptz, timezone) function. First parameter can be '5 year', '2 month', '6 hour', '3 hour', '15 minute', '10 second' etc. -- Przemysław Sztoch | Mobile +48 509 99 00 66 diff --git a/src/backen

Re: Easy dump of partitioned and inherited data

2023-05-18 Thread Przemysław Sztoch
Przemysław Sztoch wrote on 17.05.2023 17:46: || |2. Another common usability problem is a quick dump of the selected parent table. It is important that it should includes all inherited tables or subpartitions. Now you can't just specify -t root-table-name, because you'll usual

Re: [PATCH] Support % wildcard in extension upgrade filenames

2023-05-18 Thread Przemysław Sztoch
hould also be allowed as the source version. Some extensions are a collection of CREATE OR REPLACE FUNCTION. All upgrades are one and the same SQL file. For example: address_standardizer_data_us--ANY--3.2.4.sql -- Przemysław Sztoch | Mobile +48 509 99 00 66

Easy dump of partitioned and inherited data

2023-05-17 Thread Przemysław Sztoch
it should includes all inherited tables or subpartitions. Now you can't just specify -t root-table-name, because you'll usually get an empty data dump. The list of necessary tables is sometimes very long and, when using timescaledb, partition tables are called not humanly. | --

Re: generate_series for timestamptz and time zone problem

2023-01-30 Thread Przemysław Sztoch
patch. I propose to get the approval of the current truncated version of the patch. As I wrote above, I will continue work on date_trunc later and as a separate patch. -- Przemysław Sztoch | Mobile +48 509 99 00 66

FTS parser - missing UUID token type

2022-09-14 Thread Przemysław Sztoch
0856c28':1 '82d3':6 'aaf':5 'aaf-82d3-e4962f5b732d':4 'e4962f5b732d':7 00a1cc84-816a-490a-a99c-8a4c637380b0    '00a1cc84':2 '00a1cc84-816a-490a-a99c-8a4c637380b0':1 '490a':4 '816a':3 '8a4c637380b0':6 'a99c':5 As a result, such identifiers cannot be found in the database later. What is your opinion on missing tokens for FTS? -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-07-13 Thread Przemysław Sztoch
l I would choose option 1. P.S. I will be going on vacation and it would be nice to close this patch soon. TIA. -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-07-05 Thread Przemysław Sztoch
o with point 3, I will correct it and send new patches. -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: generate_series for timestamptz and time zone problem

2022-07-04 Thread Przemysław Sztoch
Przemysław Sztoch wrote on 01.07.2022 15:43: Gurjeet Singh wrote on 01.07.2022 06:35: On Tue, Jun 21, 2022 at 7:56 AM Przemysław Sztoch wrote: Please give me feedback on how to properly store the timezone name in the function context structure. I can't finish my work without it. The

Re: generate_series for timestamptz and time zone problem

2022-07-04 Thread Przemysław Sztoch
regards, tom lane Thx. Code is refactored. It is better, now. -- Przemysław Sztoch | Mobile +48 509 99 00 66 diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index f70f829d83..ee1dee7c84 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/u

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-07-03 Thread Przemysław Sztoch
Michael Paquier wrote on 6/28/2022 7:14 AM: On Thu, Jun 23, 2022 at 02:10:42PM +0200, Przemysław Sztoch wrote: The only division that is probably possible is the one attached. Well, the addition of cyrillic does not make necessary the removal of SOUND RECORDING COPYRIGHT or the DEGREEs, that

Re: generate_series for timestamptz and time zone problem

2022-07-01 Thread Przemysław Sztoch
Gurjeet Singh wrote on 01.07.2022 06:35: On Tue, Jun 21, 2022 at 7:56 AM Przemysław Sztoch wrote: Please give me feedback on how to properly store the timezone name in the function context structure. I can't finish my work without it. The way I see it, I don't think you need to st

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-06-23 Thread Przemysław Sztoch
e range of letters and the removal of the sound copyright from the special cases can be done on their own, before considering the original case tackled by this thread. -- Michael The only division that is probably possible is the one attached. -- Przemysław Sztoch | Mobile +48 509 99 00

Re: generate_series for timestamptz and time zone problem

2022-06-21 Thread Przemysław Sztoch
Przemysław Sztoch wrote on 14.06.2022 21:46: Tom Lane wrote on 14.06.2022 15:43: =?UTF-8?Q?Przemys=c5=82aw_Sztoch?= 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

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-06-21 Thread Przemysław Sztoch
upport for category: So - Other Symbol. This category include characters from special_cases(). -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-06-21 Thread Przemysław Sztoch
Michael Paquier wrote on 21.06.2022 02:11: On Mon, Jun 20, 2022 at 10:37:57AM +0200, Przemysław Sztoch wrote: But ligature check is performed on combining_ids (result of translation), not on base codepoint. Without it, you will get assertions in get_plain_letters. Hmm. I am wondering if we

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-06-20 Thread Przemysław Sztoch
Michael Paquier wrote on 20.06.2022 03:49: On Wed, Jun 15, 2022 at 01:01:37PM +0200, Przemysław Sztoch wrote: Two fixes (bad comment and fixed Latin-ASCII.xml). if codepoint.general_category.startswith('L') and \ - len(codepoint.combining_ids) > 1: +

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-06-15 Thread Przemysław Sztoch
Two fixes (bad comment and fixed Latin-ASCII.xml). Michael Paquier wrote on 17.05.2022 09:11: On Thu, May 05, 2022 at 09:44:15PM +0200, Przemysław Sztoch wrote: Tom, I disagree with you because many similar numerical conversions are already taking place, e.g. 1/2, 1/4... This part sounds like

Re: generate_series for timestamptz and time zone problem

2022-06-14 Thread Przemysław Sztoch
7;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 commit 3bc2fc7a56ecc68b00230d37d6aec97853d499f0 Author: Przemyslaw Sztoch Date:

Re: generate_series for timestamptz and time zone problem

2022-06-14 Thread Przemysław Sztoch
the proposed name for such a function (add(timestamptz, interval, timezone), date_add(timestamptz, interval, timezone), ...)? Przemysław Sztoch wrote on 01.06.2022 16:45: Tom Lane wrote on 31.05.2022 22:54: =?UTF-8?Q?Przemys=c5=82aw_Sztoch?= writes: |generate_series| ( /|start|/ |timestamp

Re: generate_series for timestamptz and time zone problem

2022-06-01 Thread Przemysław Sztoch
I don't know how to properly correct pg_proc.dat and add a variant of this function with 3 arguments now. Please comment on the patch and provide tips for pg_proc. If it works for me, I will improve generate_series. -- Przemysław Sztoch | Mobile +48 509 99 00 66 diff --git a/src/backend/u

generate_series for timestamptz and time zone problem

2022-05-31 Thread Przemysław Sztoch
function timestamptz_pl_interval. The third parameter for specifying the zone would be very useful. -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: Add --{no-,}bypassrls flags to createuser

2022-05-22 Thread Przemysław Sztoch
o a separate program. The same --comment argument is needed for the createdb command. -- Przemysław Sztoch | Mobile +48 509 99 00 66

Re: Re: Add --{no-,}bypassrls flags to createuser

2022-05-05 Thread Przemysław Sztoch
t not be perfect, but IMO it's the clearest option. Thanks! I changed the option "--membership" to "--member". For now, I also think "-m / --member" is the best choice, although it is ambiguous:( I'd like to hear others' opinions. regards -- Shiny

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-05-05 Thread Przemysław Sztoch
Tom Lane wrote on 5/4/2022 5:32 PM: Peter Eisentraut writes: On 28.04.22 18:50, Przemysław Sztoch wrote: Current unnaccent dictionary does not include many popular numeric symbols, in example: "m²" -> "m2" Seems reasonable. It kinda feels like this is outside the

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-05-05 Thread Przemysław Sztoch
Peter Eisentraut wrote on 5/4/2022 5:17 PM: On 28.04.22 18:50, Przemysław Sztoch wrote: Current unnaccent dictionary does not include many popular numeric symbols, in example: "m²" -> "m2" Seems reasonable. Can you explain what your patch does to achieve this? I

[PATCH] Completed unaccent dictionary with many missing characters

2022-04-28 Thread Przemysław Sztoch
Current unnaccent dictionary does not include many popular numeric symbols, in example: "m²" -> "m2" -- Przemysław Sztoch | Mobile +48 509 99 00 66 diff --git a/contrib/unaccent/generate_unaccent_rules.py b/contrib/unaccent/generate_unaccent_rules.py index c405e231b3..