Re: Adding comments to help understand psql hidden queries

2024-04-04 Thread Peter Eisentraut
On 03.04.24 19:16, David Christensen wrote: I removed _() in the output of the query/stars since there'd be no sensible existing translations for the constructed string, which included the query string itself. If we need it for the "QUERY" string, this could be added fairly easily, but the exist

Re: Building with musl in CI and the build farm

2024-04-04 Thread Peter Eisentraut
On 31.03.24 15:34, walt...@technowledgy.de wrote: I'd rather adapt one of the existing tasks, to avoid increasing CI costs unduly. I looked into this and I think the only task that could be changed is the SanityCheck. I think SanityCheck should run a simple, "average" environment, like the

Re: UUID v7

2024-04-04 Thread Peter Eisentraut
On 26.03.24 18:26, Andrey M. Borodin wrote: Also, you are initializing 4 bits (I think?) to zero to guard against counter rollovers (so it's really just an 8 bit counter?). But nothing checks against such rollovers, so I don't understand the use of that. No, there's only one guard rollover bi

Re: Add trim_trailing_whitespace to editorconfig file

2024-04-04 Thread Peter Eisentraut
On 19.02.24 16:21, Jelte Fennema-Nio wrote: v3-0003-Bring-editorconfig-in-line-with-gitattributes.patch I question whether we need to add rules to .editorconfig about files that are generated or imported from elsewhere, since those are not meant to be edited. I agree that it's not strictly nece

Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs

2024-04-04 Thread Peter Eisentraut
On 14.03.24 21:33, Robert Haas wrote: You seem to be supposing here that all protocol changes will consist of adding new message types. While I think that will be a common pattern, I do not think it will be a universal one. As an additional data point, the column encryption patch that is curre

Re: Built-in CTYPE provider

2024-04-04 Thread Peter Eisentraut
On 01.04.24 21:52, Jeff Davis wrote: On Tue, 2024-03-26 at 08:04 +0100, Peter Eisentraut wrote: The patch set v27 is ok with me, modulo (a) discussion about initcap semantics, and (b) what collation to assign to ucs_basic, which can be revisited later. Attached v28. The remaining patches are

Re: Silence Meson warning on HEAD

2024-04-04 Thread Peter Eisentraut
On 02.04.24 01:46, Tristan Partin wrote: A warning was recently[0] introduced into the Meson build: WARNING: Project targets '>=0.54' but uses feature introduced in '0.55.0': Passing executable/found program object to script parameter of add_dist_script There are 3 way to solve the issue tha

Re: Refactoring of pg_resetwal/t/001_basic.pl

2024-04-04 Thread Peter Eisentraut
On 26.03.24 12:53, Svetlana Derevyanko wrote: Peter Eisentraut писал(а) 2024-03-25 17:10: But MXOFF_SIZE doesn't exist anywhere else.  The actual formula uses sizeof(MultiXactOffset), which isn't obvious from your patch.  So this just moves the magic constants around by one level.

Re: Security lessons from liblzma - libsystemd

2024-04-03 Thread Peter Eisentraut
On 03.04.24 23:19, Magnus Hagander wrote: When the code is this simple, we should definitely consider carrying it ourselves. At least if we don't expect to need *other* functionality from the same library in the future, which I doubt we will from libsystemd. Well, I've long had it on my list t

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Peter Eisentraut
On 30.03.24 22:27, Thomas Munro wrote: On Sun, Mar 31, 2024 at 9:59 AM Tom Lane wrote: Thomas Munro writes: I was reminded of this thread by ambient security paranoia. As it stands, we require 1.0.2 (but we very much hope that package maintainers and others in control of builds don't decide

Re: Security lessons from liblzma

2024-04-03 Thread Peter Eisentraut
On 30.03.24 00:14, Daniel Gustafsson wrote: One take-away for me is how important it is to ship recipes for regenerating any testdata which is included in generated/compiled/binary format. Kind of how we in our tree ship the config for test TLS certificates and keys which can be manually inspect

Re: pgsql: Allow using syncfs() in frontend utilities.

2024-03-26 Thread Peter Eisentraut
On 22.03.24 17:52, Robert Haas wrote: On Wed, Sep 6, 2023 at 7:28 PM Nathan Bossart wrote: Allow using syncfs() in frontend utilities. This commit allows specifying a --sync-method in several frontend utilities that must synchronize many files to disk (initdb, pg_basebackup, pg_checksums, pg_d

Re: Improve readability by using designated initializers when possible

2024-03-26 Thread Peter Eisentraut
On 25.03.24 06:00, jian he wrote: looking through v4 again. v4 looks good to me. Thanks, I have committed this.

Re: make dist using git archive

2024-03-26 Thread Peter Eisentraut
On 26.03.24 01:23, Andres Freund wrote: On 2024-03-25 06:44:33 +0100, Peter Eisentraut wrote: Done and committed. This triggered a new warning for me: ../../../../../home/andres/src/postgresql/meson.build:3422: WARNING: Project targets '>=0.54' but uses feature introduc

Re: Built-in CTYPE provider

2024-03-26 Thread Peter Eisentraut
On 25.03.24 18:52, Jeff Davis wrote: OK, I'll propose a "title" or "titlecase" function for 18, along with "casefold" (which I was already planning to propose). (Yay, casefold will be useful.) What do you think about UPPER/LOWER and full case mapping? Should there be extra arguments for full

Re: Built-in CTYPE provider

2024-03-26 Thread Peter Eisentraut
On 21.03.24 01:13, Jeff Davis wrote: The v26 patch was not quite complete, so I didn't commit it yet. Attached v27-0001 and 0002. 0002 is necessary because otherwise lc_collate_is_c() short-circuits the version check in pg_newlocale_from_collation(). With 0002, the code is simpler and all paths

Re: documentation structure

2024-03-25 Thread Peter Eisentraut
On 22.03.24 15:10, Robert Haas wrote: Sorry. I didn't mean to dispute the point that the section was added a few years ago, nor the point that most people just want to read about the binaries. I am confident that both of those things are true. What I do want to dispute is that having a four-sente

Re: documentation structure

2024-03-25 Thread Peter Eisentraut
On 22.03.24 14:59, Robert Haas wrote: And I don't believe that if someone were writing a physical book about PostgreSQL from scratch, they'd ever end up with a top-level chapter that looks anything like our GiST chapter. All of the index AM chapters are quite obviously clones of each other, and t

Re: Refactoring of pg_resetwal/t/001_basic.pl

2024-03-25 Thread Peter Eisentraut
On 21.03.24 17:58, Maxim Orlov wrote: In commit 7b5275eec more tests and test coverage were added into pg_resetwal/t/001_basic.pl . All the added stuff are pretty useful in my view.  Unfortunately, there were some magic constants been used.  In overall, this is not a problem

Re: speed up a logical replica setup

2024-03-25 Thread Peter Eisentraut
On 25.03.24 13:36, Bharath Rupireddy wrote: On Mon, Mar 25, 2024 at 5:25 PM Peter Eisentraut wrote: I have committed your version v33. Looks like BF animals aren't happy, please check - https://buildfarm.postgresql.org/cgi-bin/show_failures.pl. Looks like sanitizer failures. There w

Re: speed up a logical replica setup

2024-03-25 Thread Peter Eisentraut
On 22.03.24 04:31, Euler Taveira wrote: On Thu, Mar 21, 2024, at 6:49 AM, Shlok Kyal wrote: There is a compilation error while building postgres with the patch due to a recent commit. I have attached a top-up patch v32-0003 to resolve this compilation error. I have not updated the version of the

Re: Built-in CTYPE provider

2024-03-25 Thread Peter Eisentraut
On 22.03.24 18:26, Jeff Davis wrote: On Fri, 2024-03-22 at 15:51 +0100, Peter Eisentraut wrote: I think this might be too big of a compatibility break.  So far, initcap('123abc') has always returned '123abc'.  If the new collation returns '123Abc' now, then that&#x

Re: make dist using git archive

2024-03-24 Thread Peter Eisentraut
On 24.03.24 16:42, Tristan Partin wrote: You might find Meson's string formatting syntax creates a more readable command string: 'tar.tar.bz2.command=@0@ -c'.format(bzip2.path()) And then 'install: false' is the default if you feel like leaving it out. Otherwise, let's get this in! Done and

Re: make dist using git archive

2024-03-24 Thread Peter Eisentraut
On 22.03.24 18:29, Tristan Partin wrote: On Thu Mar 21, 2024 at 3:44 AM CDT, Peter Eisentraut wrote: Here is an updated version of this patch set. You should add 'disabler: true' to the git find_program in Meson. If Git doesn't exist on the system with the way your pat

Re: SQL:2011 application time

2024-03-24 Thread Peter Eisentraut
On 23.03.24 18:42, Paul Jungwirth wrote: Now this is a long chain of reasoning to say rangetypes are safe. I added a comment. Note it doesn't apply to arbitrary types, so if we support those eventually we should just require a recheck always, or alternately use equals, not containedby. (That wo

Re: SQL:2011 application time

2024-03-22 Thread Peter Eisentraut
On 22.03.24 01:35, Paul Jungwirth wrote: > 1. In ri_triggers.c ri_KeysEqual, you swap the order of arguments to ri_AttributesEqual(): > > -   if (!ri_AttributesEqual(riinfo->ff_eq_oprs[i], RIAttType(rel, attnums[i]), > -   oldvalue, newvalue)) > +  

Re: Built-in CTYPE provider

2024-03-22 Thread Peter Eisentraut
On 21.03.24 01:13, Jeff Davis wrote: Are there any test cases that illustrate the word boundary changes in patch 0005?  It might be useful to test those against Oracle as well. The tests include initcap('123abc') which is '123abc' in the PG_C_UTF8 collation vs '123Abc' in PG_UNICODE_FAST. The r

Re: UUID v7

2024-03-22 Thread Peter Eisentraut
On 20.03.24 19:08, Andrey M. Borodin wrote: On 19 Mar 2024, at 13:55, Peter Eisentraut wrote: On 16.03.24 18:43, Andrey M. Borodin wrote: On 15 Mar 2024, at 14:47, Aleksander Alekseev wrote: +1 to the idea. I doubt that anyone will miss it. PFA v22. Changes: 1. Squashed all

Re: documentation structure

2024-03-22 Thread Peter Eisentraut
On 22.03.24 13:50, Robert Haas wrote: On Thu, Mar 21, 2024 at 7:37 PM Peter Eisentraut wrote: On 20.03.24 17:43, Robert Haas wrote: 0001 removes the "Installation from Binaries" chapter. The whole thing is four sentences. I moved the most important information into the "In

Re: UUID v7

2024-03-22 Thread Peter Eisentraut
On 21.03.24 16:21, Jelte Fennema-Nio wrote: On Wed, 20 Mar 2024 at 19:08, Andrey M. Borodin wrote: Timer-based bits contribute to global sortability. But the real timers we have are not even millisecond adjusted. We can hope for ~few ms variation in one datacenter or in presence of atomic clo

Re: Reducing output size of nodeToString

2024-03-22 Thread Peter Eisentraut
On 20.03.24 13:03, Matthias van de Meent wrote: On Wed, 20 Mar 2024 at 12:49, Peter Eisentraut wrote: On 19.03.24 17:13, Peter Eisentraut wrote: On 11.03.24 21:52, Matthias van de Meent wrote: * v7-0003-gen_node_support.pl-Mark-location-fields-as-type-.patch This looks sensible, but maybe

Re: automating RangeTblEntry node support

2024-03-21 Thread Peter Eisentraut
On 21.03.24 10:51, Andrew Dunstan wrote: At this point, I'm not too stressed about pressing forward with these last two patches.  We can look at them again perhaps if we make progress on a more compact node output format.  When I started this thread, I had a lot of questio

Re: documentation structure

2024-03-21 Thread Peter Eisentraut
On 21.03.24 15:31, Robert Haas wrote: On Thu, Mar 21, 2024 at 9:38 AM Tom Lane wrote: I'd follow the extend.sgml precedent: have a file corresponding to the chapter and containing any top-level text we need, then that includes a file per sect1. OK, here's a new patch set. I've revised 0003 an

Re: documentation structure

2024-03-21 Thread Peter Eisentraut
On 20.03.24 17:43, Robert Haas wrote: 0001 removes the "Installation from Binaries" chapter. The whole thing is four sentences. I moved the most important information into the "Installation from Source Code" chapter and retitled it "Installation". But this separation was explicitly added a few

Re: documentation structure

2024-03-21 Thread Peter Eisentraut
On 19.03.24 14:50, Tom Lane wrote: Daniel Gustafsson writes: It's actually not very odd, the reference section is using elements and we had missed the arabic numerals setting on those. The attached fixes that for me. That being said, we've had roman numerals for the reference section since f

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-03-21 Thread Peter Eisentraut
On 17.03.24 15:09, Alexander Korotkov wrote: My current attempt was to commit minimal implementation as less invasive as possible. A new clause for BEGIN doesn't require additional keywords and doesn't introduce additional statements. But yes, this is still a new qual. And, yes, Amit you're ri

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-03-21 Thread Peter Eisentraut
On 19.03.24 18:38, Kartyshov Ivan wrote: CALL pg_wait_lsn('0/3002AE8', 1); BEGIN; SELECT * FROM tbl; // read fresh insertions COMMIT; I'm not endorsing this or any other approach, but I think the timeout parameter should be of type in

Re: Adding comments to help understand psql hidden queries

2024-03-21 Thread Peter Eisentraut
On 21.03.24 18:31, David Christensen wrote: Thanks for the feedback. Enclosed is a v2 of this series(?) rebased and with that warning fixed; @Greg Sabino Mullane I just created a commit on your behalf with the message to hackers. I'm also creating a commit-fest entry for this thread. I don't

Re: Refactoring of pg_resetwal/t/001_basic.pl

2024-03-21 Thread Peter Eisentraut
On 21.03.24 17:58, Maxim Orlov wrote: In commit 7b5275eec more tests and test coverage were added into pg_resetwal/t/001_basic.pl . All the added stuff are pretty useful in my view.  Unfortunately, there were some magic constants been used.  In overall, this is not a problem

Re: doc issues in event-trigger-matrix.html

2024-03-21 Thread Peter Eisentraut
On 19.03.24 10:34, Daniel Gustafsson wrote: "Only for local objects" is there any reference explaining "local objects"? I think local object means objects that only affect one single database? That's a bigger problem than the table representation, we never define what "local object" mean anywher

Re: SQL:2011 application time

2024-03-21 Thread Peter Eisentraut
On 20.03.24 17:21, Paul Jungwirth wrote: On 3/20/24 03:55, jian he wrote: hi. minor cosmetic issues, other than that, looks good. *pk_period = (indexStruct->indisexclusion); to *pk_period = indexStruct->indisexclusion; ... > if (with_period && !fkconstraint->fk_with_period) ereport(ERROR, (err

Re: An improved README experience for PostgreSQL

2024-03-21 Thread Peter Eisentraut
On 28.02.24 20:30, Nathan Bossart wrote: On Wed, Feb 28, 2024 at 01:08:03PM -0600, Nathan Bossart wrote: -PostgreSQL Database Management System -= +# PostgreSQL Database Management System This change can be omitted, which makes the conversion even simpler.

Re: speed up a logical replica setup

2024-03-21 Thread Peter Eisentraut
On 21.03.24 12:35, vignesh C wrote: Here are a few suggestions: 1) I felt displaying the server log to the console is not a good idea, I prefer this to be logged. There were similar comments from Kuroda-san at [1], Peter at [2]. The number of lines will increase based on the log level set. If you

Re: Catalog domain not-null constraints

2024-03-21 Thread Peter Eisentraut
OT NULL constraints is an extension. The CREATE DOMAIN reference page already explains why all of this is a bad idea. Do we want to document all of that further, or maybe we just want to rip out domain not-null constraints, or at least not add further syntax for it? From 0bdc4944879670b7b

Re: table inheritance versus column compression and storage settings

2024-03-21 Thread Peter Eisentraut
On 07.03.24 17:54, Ashutosh Bapat wrote: The pg_dump problems arise because we throw an error when parents have conflicting compression and storage properties. The patch that got reverted, changed this slightly by allowing a child to override parent's properties even when they conflict. It stil

Re: make dist using git archive

2024-03-21 Thread Peter Eisentraut
runs about 10 seconds in each task, and takes a bit of disk space for the artifacts. I'm not sure to what degree this might bother someone. From d7c11e243d46e7e4ca0c4d0397680c3cce003687 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 11 Feb 2024 23:58:42 +0100 Subject: [PA

Re: Trying to build x86 version on windows using meson

2024-03-21 Thread Peter Eisentraut
On 20.03.24 22:49, Dave Cramer wrote: On Wed, 20 Mar 2024 at 17:11, Andres Freund > wrote: Hi, On 2024-03-20 16:14:23 -0400, Dave Cramer wrote: > I am getting the following error > > meson.build:1479:17: ERROR: Can not run test applications

Re: Improve readability by using designated initializers when possible

2024-03-20 Thread Peter Eisentraut
On 18.03.24 11:01, jian he wrote: select relname from pg_class where relisshared and relkind = 'r'; relname --- pg_authid pg_subscription pg_database pg_db_role_setting pg_tablespace pg_auth_members pg_shdepend pg_shdescription pg_replication_origin

Re: Reducing output size of nodeToString

2024-03-20 Thread Peter Eisentraut
On 19.03.24 17:13, Peter Eisentraut wrote: On 11.03.24 21:52, Matthias van de Meent wrote: * v7-0003-gen_node_support.pl-Mark-location-fields-as-type-.patch This looks sensible, but maybe making Location a global type is a bit much?  Maybe something more specific like ParseLocation, or

Re: Catalog domain not-null constraints

2024-03-20 Thread Peter Eisentraut
On 19.03.24 10:57, jian he wrote: this new syntax need to be added into the alter_domain.sgml's synopsis and also need an explanation varlistentry? The ALTER DOMAIN reference page refers to CREATE DOMAIN about the details of the constraint syntax. I believe this is still accurate. We could

Re: Catalog domain not-null constraints

2024-03-20 Thread Peter Eisentraut
On 18.03.24 11:02, Aleksander Alekseev wrote: Hi, Anyway, in order to move this forward, here is an updated patch where the ADD CONSTRAINT ... NOT NULL behavior for domains matches the idempotent behavior of tables. This uses the patch that Jian He posted. I tested the patch on Raspberry Pi

Re: REVOKE FROM warning on grantor

2024-03-20 Thread Peter Eisentraut
On 18.03.24 22:30, Tom Lane wrote: regression=# revoke foo from joe; WARNING: role "joe" has not been granted membership in role "foo" by role "postgres" REVOKE ROLE What the OP is on about is that that last case issues WARNING not ERROR. Another point is that granting a role that has alread

Re: What is a typical precision of gettimeofday()?

2024-03-19 Thread Peter Eisentraut
On 19.03.24 10:38, Aleksander Alekseev wrote: Considering the number of environments PostgreSQL can run in (OS + hardware + virtualization technologies) and the fact that hardware/software changes I doubt that it's realistic to expect any particular guarantees from gettimeofday() in the general c

Re: speed up a logical replica setup

2024-03-19 Thread Peter Eisentraut
On 19.03.24 16:24, vignesh C wrote: The problem with this failure is that standby has been promoted already and we will have to re-create the physica replica again. If you are not planning to have the checks for name length, this could alternatively be fixed by including database id also while q

Re: Reducing output size of nodeToString

2024-03-19 Thread Peter Eisentraut
On 11.03.24 21:52, Matthias van de Meent wrote: * v7-0003-gen_node_support.pl-Mark-location-fields-as-type-.patch This looks sensible, but maybe making Location a global type is a bit much? Maybe something more specific like ParseLocation, or ParseLoc, to keep it under 12 characters. I've gone

Re: Built-in CTYPE provider

2024-03-19 Thread Peter Eisentraut
* v25-0001-Address-more-review-comments-on-commit-2d819a08a.patch This was committed. * v25-0002-Support-C.UTF-8-locale-in-the-new-builtin-collat.patch Looks ok. * v25-0003-Inline-basic-UTF-8-functions.patch ok * v25-0004-Use-version-for-builtin-collations.patch Not sure about the version f

Re: speed up a logical replica setup

2024-03-19 Thread Peter Eisentraut
On 19.03.24 12:26, Shlok Kyal wrote: I'm attaching a new version (v30) that adds: * 3 new options (--publication, --subscription, --replication-slot) to assign names to the objects. The --database option used to ignore duplicate names, however, since these new options rely on the number of

Re: speed up a logical replica setup

2024-03-19 Thread Peter Eisentraut
On 19.03.24 08:05, Amit Kapila wrote: On Mon, Mar 18, 2024 at 7:22 PM Peter Eisentraut wrote: In check_subscriber(): All these permissions checks seem problematic to me. We shouldn't reimplement our own copy of the server's permission checks. The server can check the permission

Re: SQL:2011 application time

2024-03-19 Thread Peter Eisentraut
On 16.03.24 22:37, Paul A Jungwirth wrote: Here is a new patch series addressing the last few feedback emails from Peter & Jian He. It mostly focuses on the FKs patch, trying to get it really ready to commit, I have committed the test changes (range and date format etc.). The FOREIGN KEY patch

Re: Inconsistent printf placeholders

2024-03-19 Thread Peter Eisentraut
On 15.03.24 08:20, Kyotaro Horiguchi wrote: diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c @@ -1369,8 +1369,8 @@ ReadTwoPhaseFile(TransactionId xid, bool missing_ok) errmsg("could not read file \"%s\": %m", pat

Re: UUID v7

2024-03-19 Thread Peter Eisentraut
On 16.03.24 18:43, Andrey M. Borodin wrote: On 15 Mar 2024, at 14:47, Aleksander Alekseev wrote: +1 to the idea. I doubt that anyone will miss it. PFA v22. Changes: 1. Squashed all editorialisation by Jelte 2. Fixed my erroneous comments on using Method 2 (we are using method 1 instead) 3. R

What is a typical precision of gettimeofday()?

2024-03-19 Thread Peter Eisentraut
Over in the thread discussing the addition of UUIDv7 support [0], there is some uncertainty about what timestamp precision one can expect from gettimeofday(). UUIDv7 uses milliseconds since Unix epoch, but can optionally use up to 12 additional bits of timestamp precision (see [1]), but it can

Re: Reducing connection overhead in pg_upgrade compat check phase

2024-03-19 Thread Peter Eisentraut
On 18.03.24 13:11, Daniel Gustafsson wrote: Attached is a fresh rebase with only minor cosmetic touch-ups which I would like to go ahead with during this CF. Peter: does this address the comments you had on translation and code duplication? Yes, this looks good.

Re: What about Perl autodie?

2024-03-18 Thread Peter Eisentraut
On 18.03.24 09:17, Daniel Gustafsson wrote: On 18 Mar 2024, at 07:27, Peter Eisentraut wrote: After some pondering, I figured the exclude list is better. Agreed. So here is a squashed patch, also with a complete commit message. Looks good from a read-through. It would have been nice

Re: speed up a logical replica setup

2024-03-18 Thread Peter Eisentraut
t it's ugly. From ec8e6ed6c3325a6f9fde2d1632346e212ade9c9f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 18 Mar 2024 14:48:55 +0100 Subject: [PATCH] Various improvements --- src/bin/pg_basebackup/Makefile | 2 +- src/bin/pg_basebackup/nls.mk

Re: speed up a logical replica setup

2024-03-18 Thread Peter Eisentraut
40. ``` * XXX this code was extracted from BootStrapXLOG(). ``` So, can we extract the common part to somewhere? Since system identifier is related with the controldata file, I think it can be located in controldata_util.c. Let's leave it as is for this PG release.

Re: speed up a logical replica setup

2024-03-18 Thread Peter Eisentraut
On 18.03.24 08:18, vignesh C wrote: 1) Maximum size of the object name is 64, we can have a check so that we don't specify more than the maximum allowed length: + case 3: + if (!simple_string_list_member(&opt.replslot_names, optarg)) + { + simple_string_list_append(&opt.replslot_names, optarg); +

Re: Remove a FIXME and unused variables in Meson

2024-03-18 Thread Peter Eisentraut
On 14.03.24 06:13, Tristan Partin wrote: One of them adds version gates to two LLVM flags (-frwapv, -fno-strict-aliasing). I believe we moved the minimum LLVM version recently, so these might not be necessary, but maybe it helps for historictal reasons. If not, I'll just remove the comment in a

Re: Catalog domain not-null constraints

2024-03-18 Thread Peter Eisentraut
ERE domain_name IN ('con', 'dom', 'pos_int', 'things') + ORDER BY domain_name; + +SELECT * FROM information_schema.check_constraints + WHERE (constraint_schema, constraint_name) +IN (SELECT constraint_schema, constraint_name + FROM information_schema.domain_cons

Re: Improve readability by using designated initializers when possible

2024-03-18 Thread Peter Eisentraut
: Peter Eisentraut Date: Mon, 18 Mar 2024 08:07:37 +0100 Subject: [PATCH v4] Remove ObjectClass ObjectClass is an enum whose values correspond to catalog OIDs. But the extra layer of redirection, which is used only in small parts of the code, and the similarity to ObjectType, are confusing and

Re: What about Perl autodie?

2024-03-17 Thread Peter Eisentraut
On 21.02.24 08:26, Peter Eisentraut wrote: On 14.02.24 17:52, Peter Eisentraut wrote: A gentler way might be to start using some perlcritic policies like InputOutput::RequireCheckedOpen or the more general InputOutput::RequireCheckedSyscalls and add explicit error checking at the sites it

Re: Make attstattarget nullable

2024-03-17 Thread Peter Eisentraut
On 14.03.24 15:46, Tomas Vondra wrote: 2) The newtarget handling in AlterStatistics seems rather confusing. Why does it get set to -1 just to ignore the value later? For a while I was 99% sure ALTER STATISTICS ... SET STATISTICS DEFAULT will set the field to -1. Maybe ditching the first if block

Re: clarify equalTupleDescs()

2024-03-16 Thread Peter Eisentraut
On 13.03.24 19:43, Tomas Vondra wrote: I looked at this patch today. I went through all the calls switched to equalRowTypes, and AFAIK all of them are correct - all the places switched to equalRowTypes() only need the weaker checks. There's only two places still calling equalTupleDescs() - relca

Re: Reports on obsolete Postgres versions

2024-03-14 Thread Peter Eisentraut
On 13.03.24 18:12, Bruce Momjian wrote: On Wed, Mar 13, 2024 at 09:21:27AM -0700, Jeremy Schneider wrote: It's not just roadmaps and release pages where we mix up these terms either, it's even in user-facing SQL and libpq routines: both PQserverVersion and current_setting('server_version_num') r

Re: UUID v7

2024-03-14 Thread Peter Eisentraut
On 14.03.24 12:25, Andrey M. Borodin wrote: I think the behavior of uuid_extract_var(iant) is wrong. The code takes just two bits to return, but the draft document is quite clear that the variant is 4 bits (see Table 1). Well, it was correct only for implemented variant. I've made version that

Re: Built-in CTYPE provider

2024-03-14 Thread Peter Eisentraut
On 14.03.24 09:08, Jeff Davis wrote: 0001 (the C.UTF-8 locale) is also close. Considering that most of the infrastructure is already in place, that's not a large patch. You many have some comments about the way I'm canonicalizing and validating in initdb -- that could be cleaner, but it feels lik

Re: Catalog domain not-null constraints

2024-03-14 Thread Peter Eisentraut
On 14.03.24 15:03, Alvaro Herrera wrote: On 2024-Mar-14, Peter Eisentraut wrote: Perhaps it would make sense if we change the ALTER TABLE command to be like ALTER TABLE t1 ADD IF NOT EXISTS NOT NULL c1 Then the behavior is like one would expect. For ALTER TABLE, we would reject this

Re: Inconsistent printf placeholders

2024-03-14 Thread Peter Eisentraut
On 14.03.24 05:20, Kyotaro Horiguchi wrote: A recent commit 6612185883 introduced two error messages that are identical in text but differ in their placeholders. - pg_fatal("could not read file \"%s\": read only %d of %d bytes", -fil

Re: Catalog domain not-null constraints

2024-03-14 Thread Peter Eisentraut
On 12.02.24 11:24, Alvaro Herrera wrote: On 2024-Feb-11, Peter Eisentraut wrote: But I see that table constraints do not work that way. A command like ALTER TABLE t1 ADD NOT NULL c1 does nothing if the column already has a NOT NULL constraint. I'm not sure this is correct. At least it&

Re: UUID v7

2024-03-14 Thread Peter Eisentraut
On 10.03.24 13:59, Andrey M. Borodin wrote: The functions uuid_extract_ver and uuid_extract_var could be named uuid_extract_version and uuid_extract_variant. Otherwise, it's hard to tell them apart, with only one letter different. Renamed. Another related comment: Throughout your patch, swap

Re: Make attstattarget nullable

2024-03-14 Thread Peter Eisentraut
On 12.03.24 14:32, Tomas Vondra wrote: On 3/12/24 13:47, Peter Eisentraut wrote: On 06.03.24 22:34, Tomas Vondra wrote: 0001 1) I think this bit in ALTER STATISTICS docs is wrong: -  new_target +  SET STATISTICS { integer | DEFAULT } because it means we now have list entries

Re: Built-in CTYPE provider

2024-03-14 Thread Peter Eisentraut
On 14.03.24 09:08, Jeff Davis wrote: On Wed, 2024-03-13 at 00:44 -0700, Jeff Davis wrote: New series attached. I plan to commit 0001 very soon. Committed the basic builtin provider, supporting only the "C" locale. As you were committing this, I had another review of v23-0001-Introduce-colla

Re: Put genbki.pl output into src/include/catalog/ directly

2024-03-13 Thread Peter Eisentraut
On 14.03.24 02:33, Andreas Karlsson wrote: On 3/13/24 12:41 PM, Andreas Karlsson wrote: On 2/8/24 8:58 AM, Peter Eisentraut wrote: I think keeping the two build systems aligned this way will be useful for longer-term maintenance. Agreed, so started reviewing the patch. Attached is a rebased

Re: Support a wildcard in backtrace_functions

2024-03-13 Thread Peter Eisentraut
On 08.03.24 16:55, Jelte Fennema-Nio wrote: On Fri, 8 Mar 2024 at 15:51, Peter Eisentraut wrote: What is the relationship of these changes with the recently added backtrace_on_internal_error? I think that's a reasonable question. And the follow up ones too. I think it all depends o

Re: Regarding the order of the header file includes

2024-03-13 Thread Peter Eisentraut
On 12.03.24 12:47, Richard Guo wrote: On Wed, Mar 6, 2024 at 5:32 PM Richard Guo > wrote: Please note that this patch only addresses the order of header file includes in backend modules (and might not be thorough).  It is possible that other modules m

Re: Using the %m printf format more

2024-03-13 Thread Peter Eisentraut
On 12.03.24 02:22, Michael Paquier wrote: On Mon, Mar 11, 2024 at 11:19:16AM +, Dagfinn Ilmari Mannsåker wrote: On closer look, fprintf() is actually the only errno-clobbering function it calls, I was just hedging my bets in that statement. This makes the whole simpler, so I'd be OK with t

Re: Improve readability by using designated initializers when possible

2024-03-13 Thread Peter Eisentraut
On 08.03.24 06:50, Michael Paquier wrote: On Mon, Mar 04, 2024 at 09:29:03AM +0800, jian he wrote: On Fri, Mar 1, 2024 at 5:26 PM Peter Eisentraut wrote: Oops, there was a second commit in my branch that I neglected to send in. Here is my complete patch set. Thanks for the new patch set

Re: meson vs tarballs

2024-03-13 Thread Peter Eisentraut
On 13.03.24 07:42, Andrew Dunstan wrote: On 2024-03-13 We 02:31, Andrew Dunstan wrote: On 2024-03-13 We 02:22, Peter Eisentraut wrote: On 13.03.24 07:11, Andrew Dunstan wrote: I and several colleagues have just been trying to build from a tarball with meson. That seems pretty awful and

Re: meson: Specify -Wformat as a common warning flag for extensions

2024-03-13 Thread Peter Eisentraut
On 08.03.24 17:05, Tristan Partin wrote: Ok, I figured this out. -Wall implies -Wformat=1. We set warning_level to 1 in the Meson project() call, which implies -Wall, and set -Wall in CFLAGS for autoconf. That's the reason we don't get issues building Postgres. A user making use of the pg_confi

Re: Disable LLVM bitcode generation with pgxs.mk framework.

2024-03-12 Thread Peter Eisentraut
On 12.03.24 14:38, Xing Guo wrote: When the PostgreSQL server is configured with --with-llvm, the pgxs.mk framework will generate LLVM bitcode for extensions automatically. Sometimes, I don't want to generate bitcode for some extensions. I can turn off this feature by specifying with_llvm=0 in th

Re: meson vs tarballs

2024-03-12 Thread Peter Eisentraut
On 13.03.24 07:11, Andrew Dunstan wrote: I and several colleagues have just been trying to build from a tarball with meson. That seems pretty awful and unfriendly and I didn't see anything about it in the docs. At https://www.postgresql.org/docs/16/install-requirements.html is says: """ Alt

Re: Sequence Access Methods, round two

2024-03-12 Thread Peter Eisentraut
On 12.03.24 00:44, Michael Paquier wrote: Anyway, there is one piece of this patch set that I think has a lot of value outside of the discussion with access methods, which is to redesign pg_sequence_last_value so as it returns a (last_value, is_called) tuple rather than a (last_value). This has

Re: Make attstattarget nullable

2024-03-12 Thread Peter Eisentraut
On 06.03.24 22:34, Tomas Vondra wrote: 0001 1) I think this bit in ALTER STATISTICS docs is wrong: - new_target + SET STATISTICS { integer | DEFAULT } because it means we now have list entries for name, ..., new_name, new_schema, and then suddenly "SET STATISTICS { integer | DEF

Re: Built-in CTYPE provider

2024-03-12 Thread Peter Eisentraut
On 08.03.24 02:00, Jeff Davis wrote: And here's v22 (I didn't post v21). I committed Unicode property tables and functions, and the simple case mapping. I separated out the full case mapping changes (based on SpecialCasing.txt) into patch 0006. 0002: Basic builtin collation provider that only

Re: Reducing output size of nodeToString

2024-03-11 Thread Peter Eisentraut
-Mark-location-fields-as-type-.patch This looks sensible, but maybe making Location a global type is a bit much? Maybe something more specific like ParseLocation, or ParseLoc, to keep it under 12 characters. From dee403f637f279813f0711bbc64c365cba82c18c Mon Sep 17 00:00:00 2001 From: Peter Eisen

Re: automating RangeTblEntry node support

2024-03-11 Thread Peter Eisentraut
On 20.02.24 08:57, Peter Eisentraut wrote: On 18.02.24 00:06, Matthias van de Meent wrote: I'm not sure that the cleanup which is done when changing a RTE's rtekind is also complete enough for this purpose. Things like inline_cte_walker change the node->rtekind, which could leave

Re: SQL:2011 application time

2024-03-11 Thread Peter Eisentraut
constraint UC that specifies PRIMARY KEY. The table constraint descriptor of UC shall not include an application time period name. """ So this case is apparently explicitly ruled out. (It might be ok to make an extension here, but then we should be explicit about it.) From ebc6f065

Re: Combine headerscheck and cpluspluscheck scripts

2024-03-10 Thread Peter Eisentraut
On 07.03.24 08:30, Michael Paquier wrote: On Thu, Mar 07, 2024 at 01:37:36PM +1300, Thomas Munro wrote: +1 Looking at the patch, nice cleanup. Committed, thanks.

Re: pipe_read_line for reading arbitrary strings

2024-03-08 Thread Peter Eisentraut
On 06.03.24 10:54, Daniel Gustafsson wrote: On 6 Mar 2024, at 10:07, Peter Eisentraut wrote: On 22.11.23 13:47, Alvaro Herrera wrote: On 2023-Mar-07, Daniel Gustafsson wrote: The attached POC diff replace fgets() with pg_get_line(), which may not be an Ok way to cross the streams (it&#

Re: Call perror on popen failure

2024-03-08 Thread Peter Eisentraut
On 08.03.24 11:05, Daniel Gustafsson wrote: If popen fails in pipe_read_line we invoke perror for the error message, and pipe_read_line is in turn called by find_other_exec which is used in both frontend and backend code. This is an old codepath, and it seems like it ought to be replaced with th

<    1   2   3   4   5   6   7   8   9   10   >