Re: Is there an undocumented Syntax Check in Meson?

2024-05-09 Thread David G. Johnston
On Thu, May 9, 2024 at 1:16 PM Andres Freund wrote: > Hi, > > On 2024-05-09 09:23:37 -0700, David G. Johnston wrote: > > This needs updating: > > https://www.postgresql.org/docs/current/docguide-build-meson.html > > You mean it should have a syntax target? Or that some

Re: Document NULL

2024-05-11 Thread David G. Johnston
On Fri, May 3, 2024 at 9:00 AM David G. Johnston wrote: > On Fri, May 3, 2024 at 8:44 AM Tom Lane wrote: > >> Having said that, I reiterate my proposal that we make it a new >> > under DDL, before 5.2 Default Values which is the first >> place in ddl.sgml that assu

Re: Document NULL

2024-05-11 Thread David G. Johnston
On Saturday, May 11, 2024, Thom Brown wrote: > > Sat, May 11, 2024, 16:34 David G. Johnston > wrote: > > My plan is to have a v4 out next week, without or without a review of this >> draft, but then the subsequent few weeks will probably be a bit quiet. >> > &g

Re: Things I don't like about \du's "Attributes" column

2024-05-14 Thread David G. Johnston
On Tue, May 14, 2024 at 9:03 AM Robert Haas wrote: > On Tue, Apr 16, 2024 at 3:06 AM Pavel Luzanov > wrote: > > As for the Login column and its values. > > I'm not sure about using "Can" instead of "yes" to represent true. > > In other psql commands, boolean values are always shown as yes/no. >

Re: Postgres and --config-file option

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 2:49 AM Peter Eisentraut wrote: > On 15.05.24 04:07, Michael Paquier wrote: > > Not sure that these additions in --help or the docs are necessary. > > The rest looks OK. > > > > -"You must specify the --config-file or -D invocation " > > +"You must specify the --co

Re: add function argument names to regex* functions.

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 11:46 AM Robert Haas wrote: > On Thu, Apr 4, 2024 at 9:55 AM jian he > wrote: > > in the regexp_replace explanation section. > > changing "N" to lower-case would be misleading for regexp_replace? > > so I choose "count". > > I don't see why that would be confusing for reg

Re: add function argument names to regex* functions.

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 12:07 PM Robert Haas wrote: > On Wed, May 15, 2024 at 3:01 PM David G. Johnston > wrote: > > I think this confusion goes to show that replacing N with count doesn't > work. > > > > "replace_at" comes to mind as a better name. >

Re: [PATCH] Add --syntax to postgres for SQL syntax checking

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 12:18 PM wrote: > Tom Lane: > >> This is really what is missing for the ecosystem. A libpqparser for > >> tools to use: Formatters, linters, query rewriters, simple syntax > >> checkers... they are all missing access to postgres' own parser. > > > > To get to that, you'd n

Re: [PATCH] Add --syntax to postgres for SQL syntax checking

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 12:35 PM Josef Šimánek wrote: > st 15. 5. 2024 v 21:33 odesílatel David G. Johnston > napsal: > > > Now, in my ideal world something like this could be made as an extension > so that it can work on older versions and not have to be maintained by > c

Re: add function argument names to regex* functions.

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 12:52 PM Robert Haas wrote: > On Wed, May 15, 2024 at 3:25 PM David G. Johnston > wrote: > > The function replaces matches, not random characters. And if you are > reading the documentation I find it implausible that the wording I > suggested would cau

Re: add function argument names to regex* functions.

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 12:07 PM Robert Haas wrote: > On Wed, May 15, 2024 at 3:01 PM David G. Johnston > wrote: > > I think this confusion goes to show that replacing N with count doesn't > work. > > > > "replace_at" comes to mind as a better name. &

Re: add function argument names to regex* functions.

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 1:19 PM Robert Haas wrote: > > So my point was: to me, N is more self-documenting than replace_at, > and less self-documenting than count or occurrence. > > If your mileage varies on that point, so be it! > > Maybe just "match" instead of "replace_match". Reading this it

Re: [PATCH] Add --syntax to postgres for SQL syntax checking

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 1:00 PM Robert Haas wrote: > On Wed, May 15, 2024 at 3:28 PM Tom Lane wrote: > > Sorry: "make sense" was a poorly chosen phrase there. What I was > > doubting, and continue to doubt, is that 100% checking of what > > you can check without catalog access and 0% checking o

Re: [PATCH] Add --syntax to postgres for SQL syntax checking

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 6:35 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > > If in core I would still want to expose this as say a contrib module > binary instead of hacking it into postgres. It would be our first server > program entry there. > > Sorry fo

Re: First draft of PG 17 release notes

2024-05-15 Thread David G. Johnston
On Wednesday, May 15, 2024, jian he wrote: > On Thu, May 9, 2024 at 12:04 PM Bruce Momjian wrote: > > > > I have committed the first draft of the PG 17 release notes; you can > > see the results here: > > > > https://momjian.us/pgsql_docs/release-17.html > > > > in section: E.1.2. Migra

Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there

2024-05-16 Thread David G. Johnston
On Wed, May 15, 2024 at 8:46 AM Robert Haas wrote: > On Thu, Apr 4, 2024 at 12:41 AM Erik Wienhold wrote: > > Thanks, fixed in v4. Looks like American English prefers that comma and > > it's also more common in our docs. > > Reviewing this patch: > > - Creates a typed table, which takes it

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-16 Thread David G. Johnston
On Thu, May 16, 2024 at 11:30 AM Robert Haas wrote: > Hi, > > The original intent of CommitFests, and of commitfest.postgresql.org > by extension, was to provide a place where patches could be registered > to indicate that they needed to be reviewed, thus enabling patch > authors and patch review

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-16 Thread David G. Johnston
On Thu, May 16, 2024 at 1:46 PM Melanie Plageman wrote: > > I should probably simply > withdraw and re-register them. My justification was that I'll lose > them if I don't keep them in the commitfest app. But, I could just, > you know, save them somewhere myself instead of polluting the > commitf

Re: Postgres and --config-file option

2024-05-16 Thread David G. Johnston
On Thu, May 16, 2024 at 4:11 PM Michael Paquier wrote: > On Thu, May 16, 2024 at 11:57:10AM +0300, Aleksander Alekseev wrote: > > I propose my original v1 patch for correcting the --help output of > > 'postgres' too. I agree with the above comments that corresponding > > changes in v4 became some

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-17 Thread David G. Johnston
On Friday, May 17, 2024, Joe Conway wrote: > > I wrote: > >> Namely, the week before commitfest I don't actually know if I will have >> the time during that month, but I will make sure my patch is in the >> commitfest just in case I get a few clear days to work on it. Because if it >> isn't there

Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there

2024-05-17 Thread David G. Johnston
On Fri, May 17, 2024 at 4:57 PM Erik Wienhold wrote: > On 2024-05-16 17:47 +0200, David G. Johnston wrote: > > On Wed, May 15, 2024 at 8:46 AM Robert Haas > wrote: > > > > > On Thu, Apr 4, 2024 at 12:41 AM Erik Wienhold wrote: > > > > Thanks, fixed in v

Re: doc regexp_replace replacement string \n does not explained properly

2024-05-20 Thread David G. Johnston
On Monday, May 20, 2024, jian he wrote: > hi. > > https://www.postgresql.org/docs/current/functions- > matching.html#FUNCTIONS-POSIX-REGEXP > > > If there is a match, > the source string is returned with the replacement string substituted > for the matching substring. > This happens regardless

Re: PG catalog

2024-05-24 Thread David G. Johnston
On Thursday, May 23, 2024, Karki, Sanjay wrote: > > I need to grant select on privilege in pg_catalog to user so I can connect > via Toad Data point , > > Users can already select from the tables in pg_catalog, grant able privileges not required or allowed. Of course, some specific data is restri

Re: pgsql: Add more SQL/JSON constructor functions

2024-05-28 Thread David G. Johnston
On Monday, May 27, 2024, Alvaro Herrera wrote: > On 2024-May-27, Alvaro Herrera wrote: > > > > JSON_SERIALIZE() > > I just noticed this behavior, which looks like a bug to me: > > select json_serialize('{"a":1, "a":2}' returning varchar(5)); > json_serialize > > {"a": > > I thi

Re: Explicit specification of index ensuring uniqueness of foreign columns

2024-05-31 Thread David G. Johnston
On Friday, May 31, 2024, Tom Lane wrote: > Kaiting Chen writes: > > I'd like to resurrect a subset of my proposal in [1], specifically that: > > The FOREIGN KEY constraint syntax gains a [ USING INDEX index_name ] > clause > > optionally following the referenced column list. > > ... > > Whil

Re: Patch bug: Fix jsonpath .* on Arrays

2024-06-04 Thread David G. Johnston
On Tuesday, June 4, 2024, David E. Wheeler wrote: > Hackers, > > The behavior of the .* jpiAnyKey jsonpath selector seems incorrect. > > ``` > select jsonb_path_query('[1,2,3]', '$.*'); > jsonb_path_query > -- > (0 rows) > > select jsonb_path_query('[1,2,3,{"b": [3,4,5]}]', '$.*')

Role Graph Viewing in Core (psql: \drr \dru \drg, system view: pg_role_graph, pg_role_relationship)

2022-09-12 Thread David G. Johnston
Hi, While looking at Robert's work to improve our handling of roles I found it helpful to be able to see not only the directly recorded membership information, which now includes grantor, but also to see what was reachable via SET ROLE. The attached patch puts that information at our users' finge

Re: pg_basebackup --create-slot-if-not-exists?

2022-09-21 Thread David G. Johnston
On Wednesday, September 21, 2022, Ashwin Agrawal wrote: > Currently, pg_basebackup has > --create-slot option to create slot if not already exists or > --slot to use existing slot > > Which means it needs knowledge on if the slot with the given name already > exists or not before invoking the com

Re: Adding SHOW CREATE TABLE

2023-05-20 Thread David G. Johnston
On Sat, May 20, 2023 at 10:26 AM Stephen Frost wrote: > > A server function can be conveniently called from any client code. > > Clearly any client using libpq can conveniently call code which is in > libpq. > > Clearly there are clients that don't use libpq. JDBC comes to mind. David J.

Re: Is NEW.ctid usable as table_tuple_satisfies_snapshot?

2023-05-26 Thread David G. Johnston
On Fri, May 26, 2023 at 8:04 AM Kaiting Chen wrote: > I need to implement a trigger that will behave similarly to a foreign key > constraint. The trigger itself will be created with: > > CREATE CONSTRAINT TRIGGER ... AFTER INSERT OR UPDATE OF ... ON foo > > I'd like to skip execution of the tri

Re: QUAL Pushdown causes ERROR on syntactically and semantically correct SQL Query

2023-06-05 Thread David G. Johnston
On Mon, Jun 5, 2023, 07:40 Hans Buschmann wrote: > I have reworked the case of BUG #17842 to include the data and the > questions for further investigation. > > > The problem is NOT to correct the query to a working case, but to show a > fundamental problem with qual pushdown. > The optimization

Re: When IMMUTABLE is not.

2023-06-15 Thread David G. Johnston
On Thursday, June 15, 2023, wrote: > > So one could take a strict view that "no PL/Java function should > ever be marked IMMUTABLE" because every one depends on fetching > something (once, at least). > The failure to find and execute the function code itself is not a failure mode that these mark

Re: psql: Add role's membership options to the \du+ command

2023-06-15 Thread David G. Johnston
Robert - can you please comment on what you are willing to commit in order to close out your open item here. My take is that the design for this, the tabular form a couple of emails ago (copied here), is ready-to-commit, just needing the actual (trivial) code changes to be made to accomplish it.

Re: psql: Add role's membership options to the \du+ command

2023-06-23 Thread David G. Johnston
On Thu, Jun 22, 2023 at 5:08 PM Tom Lane wrote: > "Jonathan S. Katz" writes: > > On 6/15/23 2:47 PM, David G. Johnston wrote: > >> Robert - can you please comment on what you are willing to commit in > >> order to close out your open item here. My take

Re: psql: Add role's membership options to the \du+ command

2023-06-23 Thread David G. Johnston
On Fri, Jun 23, 2023 at 5:12 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Thu, Jun 22, 2023 at 5:08 PM Tom Lane wrote: > >> * Personally I could do without the "empty" business, but that seems > >> unnecessary in the tabular format; an

Re: psql: Add role's membership options to the \du+ command

2023-06-24 Thread David G. Johnston
On Sat, Jun 24, 2023 at 8:11 AM Pavel Luzanov wrote: > Notes > * The name of the new command. It's a good name, if not for the history. > There are two commands showing the same information about roles: \du and > \dr. > The addition of \drg may be misinterpreted: if there is \drg, then there > is

Re: CHECK Constraint Deferrable

2023-07-07 Thread David G. Johnston
On Friday, July 7, 2023, Himanshu Upadhyaya wrote: > I can think of one scenario, as below > > 1) any department should have an employee > 2)any employee should be assigned to a department > so, the employee table has a FK to the department table, and another check > constraint should be added to

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

2024-08-20 Thread David G. Johnston
On Tue, Aug 20, 2024 at 9:02 AM Robert Haas wrote: > Yes. And the major * 1 + minor convention is used in other places > already, for PG versions, so it might already be familiar to some > people. > I'm wondering why we are indicating that minor versions of the protocol are even a real thing

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

2024-08-20 Thread David G. Johnston
On Tue, Aug 20, 2024 at 9:44 AM Robert Haas wrote: > On Tue, Aug 20, 2024 at 12:42 PM David G. Johnston > wrote: > > I'm wondering why we are indicating that minor versions of the protocol > are even a real thing. > > Because that concept is already a part of

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

2024-08-20 Thread David G. Johnston
On Tue, Aug 20, 2024 at 10:03 AM Jacob Champion < jacob.champ...@enterprisedb.com> wrote: > On Tue, Aug 20, 2024 at 7:26 AM Jelte Fennema-Nio > wrote: > > In practical terms I think that means for a minor version bump the > > format of the StartupMessage cannot be changed. Changing anything else

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

2024-08-20 Thread David G. Johnston
On Tue, Aug 20, 2024 at 10:31 AM Jacob Champion < jacob.champ...@enterprisedb.com> wrote: > If we decide we can't, then so be it -- things will > break either way -- but it's still strange to me that we'd be okay > with literally zero forward compatibility and still call that a "minor > version".

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

2024-08-20 Thread David G. Johnston
On Tue, Aug 20, 2024 at 10:46 AM Jacob Champion < jacob.champ...@enterprisedb.com> wrote: > On Tue, Aug 20, 2024 at 10:42 AM David G. Johnston > wrote: > > Semantic versioning guidelines are not something we are following, > especially here. > > I understand; the pro

Re: slru bank

2024-08-22 Thread David G. Johnston
On Thu, Aug 22, 2024 at 7:07 PM 席冲(宜穆) wrote: > In SlruSelectLRUPage(), Why do we need to traverse all slots to find that > a page already has a buffer assigned? Why not find it > from the [bankstart,bankend]? > > Only the bank is searched, both of the logic loops are bounded by: for (int slotn

Re: slru bank

2024-08-22 Thread David G. Johnston
On Thu, Aug 22, 2024 at 7:27 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Thu, Aug 22, 2024 at 7:07 PM 席冲(宜穆) > wrote: > >> In SlruSelectLRUPage(), Why do we need to traverse all slots to find > that > >> a page already has a buf

Re: Non-trivial condition is only propagated to one side of JOIN

2024-08-25 Thread David G. Johnston
On Sunday, August 25, 2024, Tobias Hoffmann wrote: > > 3) Problematic example: > > # EXPLAIN SELECT * FROM tbl1 JOIN tbl2 ON tbl2.site_id = tbl1.site_id > WHERE tbl1.site_id = 1 OR tbl1.site_id IS NULL; The “is null” predicate in this query is doing nothing as your next comment alludes to; you

Re: Doc: fix the note related to the GUC "synchronized_standby_slots"

2024-08-26 Thread David G. Johnston
On Monday, August 26, 2024, Amit Kapila wrote: > On Mon, Aug 26, 2024 at 6:38 PM Zhijie Hou (Fujitsu) > wrote: > > > > On Monday, August 26, 2024 5:37 PM Amit Kapila > wrote: > > > > > > On Mon, Aug 26, 2024 at 1:30 PM wrote: > > > > > > > > When I read the following documentation related to t

Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

2024-09-03 Thread David G. Johnston
On Tuesday, September 3, 2024, Kyotaro Horiguchi wrote: > At Tue, 3 Sep 2024 10:43:14 +0530, Amit Kapila > wrote in > > On Mon, Sep 2, 2024 at 9:14 AM shveta malik > wrote: > > > > > > On Mon, Sep 2, 2024 at 5:47 AM Peter Smith > wrote: > > > > > > > > > > > > To summarize, the current de

Re: Role Granting Issues in PostgreSQL: Need Help

2024-09-04 Thread David G. Johnston
On Wednesday, September 4, 2024, Muhammad Imtiaz wrote: > > 1. Create a role with specific permissions > > CREATE ROLE rep_admin WITH LOGIN CREATEDB CREATEROLE REPLICATION; > > List of roles > Role name | Attributes >

Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

2024-09-08 Thread David G. Johnston
On Sun, Sep 8, 2024, 18:55 Peter Smith wrote: > Saying "The time..." is fine, but the suggestions given seem backwards to > me: > - The time this slot was inactivated > - The time when the slot became inactive. > - The time when the slot was deactivated. > > e.g. It is not like light switch. So,

Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options

2024-09-11 Thread David G. Johnston
On Wednesday, September 11, 2024, Tatsuo Ishii wrote: > > test=# SELECT row_number() IGNORE NULLS OVER w FROM t1 WINDOW w AS (ORDER > BY i); > row_number > > 1 > 2 > (2 rows) > > The t1 table only contains NULL rows. By using IGNORE NULLS, I think > it's no wonde

Re: Accept invalidation messages before the query starts inside a transaction

2024-09-11 Thread David G. Johnston
On Wednesday, September 11, 2024, Andrei Lepikhov wrote: > > > I don't know whether to classify this as a bug. > > [1] https://www.postgresql.org/docs/16/mvcc-caveats.html > > Seems we need to add another sentence to that final paragraph. Something like: However, once an object is accessed withi

Re: Mutable foreign key constraints

2024-09-12 Thread David G. Johnston
On Thursday, September 12, 2024, Tom Lane wrote: > > A possible objection is that if anybody has such a setup and > hasn't noticed a problem because they never change their > timezone setting, they might not appreciate us breaking it. > So I certainly wouldn't propose back-patching this. But > m

Re: Add system column support to the USING clause

2024-09-13 Thread David G. Johnston
On Friday, September 13, 2024, Denis Garsh wrote: > > > The patch adds support for system columns in JOIN USING clause. > Definitely not high on my list of oversights to fix. Resorting to the ON clause for the rare query that would need to do such a thing isn’t that costly. But as the patch exi

Re: Add system column support to the USING clause

2024-09-13 Thread David G. Johnston
On Friday, September 13, 2024, David G. Johnston wrote: > > Link to PR on GitHub: https://github.com/hilltracer/postgres/pull/3 >> > > You apparently missed the note on GitHub that says we don’t work with pull > requests. Patches are to be submitted directly to the mailing

Re: Add contrib/pg_logicalsnapinspect

2024-09-16 Thread David G. Johnston
On Monday, September 16, 2024, shveta malik wrote: > On Tue, Sep 17, 2024 at 10:18 AM shveta malik > wrote: > > > > Thanks for addressing the comments. I have not started reviewing v4 > > yet, but here are few more comments on v3: > > > > I just noticed that when we pass NULL input, both the new

Re: Duplicate unique key values in inheritance tables

2024-07-15 Thread David G. Johnston
On Monday, July 15, 2024, David Rowley wrote: > On Tue, 16 Jul 2024 at 12:45, Richard Guo wrote: > > As a workaround for this issue, I'm considering whether we can skip > > checking functional dependency on primary keys for inheritance > > parents, given that we cannot guarantee uniqueness on th

Re: Things I don't like about \du's "Attributes" column

2024-07-16 Thread David G. Johnston
On Tue, Jul 16, 2024 at 8:00 AM Robert Haas wrote: > I'm starting to have some doubts about whether this effort is really > worthwhile. It seems like what we have right now is a patch which uses > both more horizontal space and more vertical space than the current > implementation, without (IMHO)

Re: [18] Policy on IMMUTABLE functions and Unicode updates

2024-07-16 Thread David G. Johnston
On Tue, Jul 16, 2024 at 11:57 AM Joe Conway wrote: > > > There are two alternative philosophies: > > > > A. By choosing to use a Unicode-based function, the user has opted in > > to the Unicode stability guarantees[2], and it's fine to update Unicode > > occasionally in new major versions as long

Re: [18] Policy on IMMUTABLE functions and Unicode updates

2024-07-16 Thread David G. Johnston
On Tue, Jul 16, 2024 at 1:16 PM Tom Lane wrote: > Joe Conway writes: > > So you are proposing we add STATIC to VOLATILE/STABLE/IMMUTABLE (in the > > third position before IMMUTABLE), give it IMMUTABLE semantics, mark > > builtin functions that deserve it, and document with suitable caution > > s

Re: documentation structure

2024-07-18 Thread David G. Johnston
On Thu, Jul 18, 2024 at 8:06 PM Tatsuo Ishii wrote: > > I'm opposed to having a separate file for every function. I think > > breaking up func.sgml into one piece per sect1 is about right. If that > > proves cumbersome still we can look at breaking it up further, but > > let's start with that. >

How can udf c function return table, not the rows?

2024-07-19 Thread David G. Johnston
On Thursday, July 18, 2024, Wen Yi wrote: > > > pg_get_functiondef > -- > > In my expectations, it should be: > > oid | pg_get_functiondef > > --+--

Re: behavior of GROUP BY with VOLATILE expressions

2024-07-19 Thread David G. Johnston
On Fri, Jul 19, 2024 at 7:20 AM Paul George wrote: > > I wanted to surface a discussion in [1] regarding the expected behavior of > GROUP BY with VOLATILE expressions. There seems to be a discrepancy between > how volatile functions (RANDOM(), also confirmed with TIMEOFDAY()) and > subqueries are

Re: documentation structure

2024-07-19 Thread David G. Johnston
On Fri, Jul 19, 2024 at 1:01 PM Tatsuo Ishii wrote: > > Do we want to use a "func-" prefix on the file names? I could > > imagine dispensing with that as unnecessary; > > If we don't use the prefix and we generate new file names from sect1 > tag, we could have file name collision: for example, j

Re: behavior of GROUP BY with VOLATILE expressions

2024-07-19 Thread David G. Johnston
On Fri, Jul 19, 2024 at 2:21 PM Paul George wrote: > Great, thanks for the links and useful past discussions! I figured I > wasn't the first to stumble across this, and it's interesting to see the > issue arise with ORDER BY [VOLATILE FUNC] as well. > > My question was not so much about changing

Re: documentation structure

2024-07-19 Thread David G. Johnston
On Fri, Jul 19, 2024 at 5:47 PM Tatsuo Ishii wrote: > >> IMO the file name should match the ID of the sect1 element with the > leading > >> "functions-" removed, naming the directory "functions". Thus when > viewing > >> the web page the corresponding sgml file is determinable. > > > > I'd go fo

Re: [PATCH] GROUP BY ALL

2024-07-22 Thread David G. Johnston
On Mon, Jul 22, 2024 at 1:55 PM David Christensen wrote: > I see that there'd been some chatter but not a lot of discussion about > a GROUP BY ALL feature/functionality. There certainly is utility in > such a construct IMHO. > > Still need some docs; just throwing this out there and getting some

Re: [PATCH] GROUP BY ALL

2024-07-23 Thread David G. Johnston
On Tue, Jul 23, 2024 at 9:48 AM David Christensen wrote: > > Sure, not everything that makes things easier is strictly necessary; > we could require `CAST(field AS text)` instead of `::text`, Probably should have...being standard and all. Though syntactic sugar is quite different from new beha

Re: Protocol question regarding Portal vs Cursor

2024-07-25 Thread David G. Johnston
On Thursday, July 25, 2024, Dave Cramer wrote: May not make a difference but… > 2024-07-25 15:55:39 FINEST org.postgresql.core.v3.QueryExecutorImpl > sendSimpleQuery FE=> SimpleQuery(query="declare C_3 CURSOR WITHOUT HOLD > FOR SELECT * FROM testsps WHERE id = 2") > You named the cursor c_3 (

Re: How to check if issue is solved?

2024-07-25 Thread David G. Johnston
On Thursday, July 25, 2024, Mohab Yaser wrote: > I wrote a simple script to get all issues from the pgsql-bugs list that > are reported by the form (basically getting just the issues without any > replies to them) and now while searching through these issues I can't know > directly whether it is

Re: Help Needed with Including External SQL Script in Extension Script

2024-07-26 Thread David G. Johnston
On Friday, July 26, 2024, Ayush Vatsa wrote: > > I wanted to modify the SQL script of an extension by creating multiple > objects within it. > My aim is to make minimal changes to the existing script. To achieve this, > I have created an > external script and am attempting to run it within the ext

Re: Lack of possibility to specify CTAS TAM

2024-07-31 Thread David G. Johnston
On Wednesday, July 31, 2024, Kirill Reshke wrote: > I have noticed $subj while working with other unrelated patches. > The question is, why there is no CREATE TABLE AS USING > (some_access_method)? The syntax is documented… CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TAB

Re: Lack of possibility to specify CTAS TAM

2024-07-31 Thread David G. Johnston
On Wednesday, July 31, 2024, Kirill Reshke wrote: > > > The same storage specification feature can actually be supported for > CTAE (like CTAS but execute) and CREATE MATERIALIZED VIEW. > > On a related note, the description here seems outdated. https://www.postgresql.org/docs/current/runtime-co

Re: Lack of possibility to specify CTAS TAM

2024-07-31 Thread David G. Johnston
On Wednesday, July 31, 2024, David G. Johnston wrote: > On Wednesday, July 31, 2024, Kirill Reshke wrote: >> >> >> The same storage specification feature can actually be supported for >> CTAE (like CTAS but execute) and CREATE MATERIALIZED VIEW. >> >> &g

Casts from jsonb to other types should cope with json null

2024-08-01 Thread David G. Johnston
On Thursday, August 1, 2024, Tom Lane wrote: > Maciek Sakrejda writes: > > Oddly, it looks like you only get a null if you use the '->>' > > operator. With '->' and a subsequent cast to text, you get the string > > "null": > > > maciek=# select (('{"a":null}'::jsonb)->'a')::text; > > text > > -

Re: can we mark upper/lower/textlike functions leakproof?

2024-08-02 Thread David G. Johnston
On Fri, Aug 2, 2024 at 6:58 AM Joe Conway wrote: > On 8/2/24 09:48, Jacob Champion wrote: > > On Thu, Aug 1, 2024 at 6:03 PM Robert Haas > wrote: > >> > >> On Thu, Aug 1, 2024 at 4:45 PM Jacob Champion > >> wrote: > >> > Would it provide enough value for effort to explicitly mark leaky > >> > p

Re: SPI_connect, SPI_connect_ext return type

2024-08-10 Thread David G. Johnston
On Saturday, August 10, 2024, Tom Lane wrote: > Stepan writes: > > Hi, hackers! If you look at the code in the src/backend/executor/spi.c > file, > > you will see the SPI_connect function familiar to many there, which > > internally simply calls SPI_connect_ext. The return type is int, at the >

Re: SPI_connect, SPI_connect_ext return type

2024-08-10 Thread David G. Johnston
On Sat, Aug 10, 2024 at 9:29 AM Tom Lane wrote: > "David G. Johnston" writes: > > On Saturday, August 10, 2024, Tom Lane wrote: > >> That would break a lot of code (much of it not under our control) to > >> little purpose; it would also fo

Re: minor doc fix - garbage in example of result of unnest

2020-06-05 Thread David G. Johnston
On Fri, Jun 5, 2020 at 8:38 AM Tomas Vondra wrote: > On Fri, Jun 05, 2020 at 09:56:54AM -0400, Tom Lane wrote: > >Pavel Stehule writes: > >> diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml > >> index 7c06afd3ea..3b810c0eb4 100644 > >> --- a/doc/src/sgml/func.sgml > >> +++ b/doc/src/

Re: Postgres installer with pgAdmin 4.22

2020-06-09 Thread David G. Johnston
On Tuesday, June 9, 2020, Joel Mariadasan (jomariad) wrote: > > We would like to know when we will get Postgres installer with latest > pgAdmin 4.22 bundled. > > The latest Postgres installer (12.3) has only 4.21 which doesn’t have fix > for certain vulnerabilities related to python. > > Ask the p

Re: Terminate the idle sessions

2020-06-09 Thread David G. Johnston
On Tuesday, June 9, 2020, Li Japin wrote: > Hi, hackers > > When some clients connect to database in idle state, postgres do not close > the idle sessions, > here i add a new GUC idle_session_timeout to let postgres close the idle > sessions, it samilar > to idle_in_transaction_session_timeout >

Re: BUG #16481: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events

2020-06-09 Thread David G. Johnston
On Tue, Jun 9, 2020 at 12:36 AM Vianello Fabio < fabio.viane...@salvagninigroup.com> wrote: > Is PostgreSQL a serious product? For me the answer is "NO". A product with > a bug that last for years and the community knows. > > It is not serious. > If you are trying to be a troll just go away, we d

DROP relation IF EXISTS Docs and Tests - Bug Fix

2020-06-17 Thread David G. Johnston
This is a follow-up to Bug # 16492 which also links to a thread sent to -hackers back in 2018. I'm firmly of the belief that the existing behavior of DROP relation IF EXISTS is flawed - it should not be an error if there is a namespace collision but the relkind of the existing relation doesn't mat

Re: DROP relation IF EXISTS Docs and Tests - Bug Fix

2020-06-17 Thread David G. Johnston
On Wed, Jun 17, 2020 at 4:32 PM Tom Lane wrote: > "David G. Johnston" writes: > > I'm firmly of the belief that the existing behavior of DROP relation IF > > EXISTS is flawed - it should not be an error if there is a namespace > > collision but the relkind of

Curious - "logical replication launcher" (PID) existed with exit code 1

2020-06-23 Thread David G. Johnston
In the following log file the presence of "exit code 1" after performing a "pg_ctl stop -m smart" shutdown is bugging me. I take it most people would just ignore it as noise but a clean install from source, startup, and shutdown would ideally not result in a non-zero exit code being sent to the lo

Re: Why forbid "INSERT INTO t () VALUES ();"

2020-06-24 Thread David G. Johnston
On Wed, Jun 24, 2020 at 3:31 PM Dagfinn Ilmari Mannsåker wrote: > FWIW, MySQL (and MariaDB) only support INSERT INTO t () VALUES (), not > DEFAULT VALUES. We have added syntax for MySQL compatibility in the > past, e.g. the CONCAT() function. > I don't see the similarities. IIUC there isn't a

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2020-06-26 Thread David G. Johnston
On Sun, Jun 21, 2020 at 10:56 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > When a query on foreign table is executed from a local session using > postgres_fdw, as expected the local postgres backend opens a > connection which causes a remote session/backend to be opened

Re: Persist MVCC forever - retain history

2020-07-02 Thread David G. Johnston
On Thursday, July 2, 2020, Mitar wrote: > make queries asking for > results at the particular historical version of table state? Even for a single table how would you go about specifying this in a user-friendly way? Then consider joins. > Is this something I would have to run a custom versi

Re: Implement UNLOGGED clause for COPY FROM

2020-07-08 Thread David G. Johnston
On Wednesday, July 8, 2020, osumi.takami...@fujitsu.com < osumi.takami...@fujitsu.com> wrote: > > 5. Sync the data to disk by performing checkpoint. > This step seems to invalidate the idea outright. The checkpoint command is superuser only and isn’t table specific. This seems to require both th

Re: Default setting for enable_hashagg_disk

2020-07-09 Thread David G. Johnston
On Thu, Jul 9, 2020 at 3:58 PM Stephen Frost wrote: > > > If folks > > > want to let HashAgg use more memory then they can set work_mem higher, > > > just the same as if they want a Sort node to use more memory or a > > > HashJoin. Yes, that comes with potential knock-on effects about other > >

Re: Default setting for enable_hashagg_disk

2020-07-10 Thread David G. Johnston
On Fri, Jul 10, 2020 at 5:16 PM David Rowley wrote: > Stephen mentions in [1] that: > > Users who are actually hit by this in a negative way > > have an option- increase work_mem to reflect what was actually happening > > already. > > Peter is not a fan of that idea, which can only be due to the

Re: Default setting for enable_hashagg_disk

2020-07-10 Thread David G. Johnston
On Fri, Jul 10, 2020 at 6:19 PM David Rowley wrote: > If we have to have a new GUC, my preference would be hashagg_mem, > where -1 means use work_mem and a value between 64 and MAX_KILOBYTES > would mean use that value. We'd need some sort of check hook to > disallow 0-63. I really am just faili

Re: Default setting for enable_hashagg_disk

2020-07-10 Thread David G. Johnston
On Fri, Jul 10, 2020 at 6:43 PM David Rowley wrote: > On Sat, 11 Jul 2020 at 13:36, David G. Johnston > wrote: > > If we add a setting that defaults to work_mem then the benefit is > severely reduced. You still have to modify individual queries, but the > change can simpl

Re: Default setting for enable_hashagg_disk

2020-07-11 Thread David G. Johnston
On Sat, Jul 11, 2020 at 7:22 AM Stephen Frost wrote: > There now seems to be some suggestions that not only should we have a > new GUC, but we should default to having it not be equal to work_mem (or > 1.0 or whatever) and instead by higher, to be *twice* or larger whatever > the existing work_me

Re: Default setting for enable_hashagg_disk

2020-07-11 Thread David G. Johnston
On Sat, Jul 11, 2020 at 5:47 PM Tom Lane wrote: > Tomas Vondra writes: > > I don't know, but one of the main arguments against simply suggesting > > people to bump up work_mem (if they're hit by the hashagg spill in v13) > > was that it'd increase overall memory usage for them. It seems strange

Re: Default setting for enable_hashagg_disk

2020-07-11 Thread David G. Johnston
On Saturday, July 11, 2020, Tom Lane wrote: > "David G. Johnston" writes: > > On Sat, Jul 11, 2020 at 5:47 PM Tom Lane wrote: > >> It seems like a lot of the disagreement here is focused on Peter's > >> proposal to make hash_mem_multiplier default to

Re: Default setting for enable_hashagg_disk

2020-07-13 Thread David G. Johnston
On Mon, Jul 13, 2020 at 11:50 AM Peter Geoghegan wrote: > > Primarily in favor of escape hatch: > > Jeff, > DavidR, > Pavel, > Andres, > Robert ??, > Amit ?? > > To be clear, by "escape hatch" you mean "add a GUC that instructs the PostgreSQL executor to ignore hash_mem when deciding whether to s

Re: DROP relation IF EXISTS Docs and Tests - Bug Fix

2020-07-13 Thread David G. Johnston
On Mon, Jul 13, 2020 at 2:12 AM Pavel Stehule wrote: > I am reading this patch. I don't think so text for domains and types are > correct (or minimally it is little bit messy) > This case is a little bit more complex - domains are not subset of > relations. But relations (in Postgres) extends typ

Re: DROP relation IF EXISTS Docs and Tests - Bug Fix

2020-07-14 Thread David G. Johnston
On Tue, Jul 14, 2020 at 5:40 AM Justin Pryzby wrote: > On Tue, Jul 14, 2020 at 07:25:56AM +0200, Pavel Stehule wrote: > > út 14. 7. 2020 v 0:37 odesílatel David G. Johnston < > david.g.johns...@gmail.com> napsal: > > > On Mon, Jul 13, 2020 at 2:12 AM Pavel Stehule

Re: DROP relation IF EXISTS Docs and Tests - Bug Fix

2020-07-14 Thread David G. Johnston
On Tue, Jul 14, 2020 at 6:56 AM Pavel Stehule wrote: > út 14. 7. 2020 v 15:55 odesílatel David G. Johnston < > david.g.johns...@gmail.com> napsal: > >> Further comments welcome so I'm putting it back into needs review for the >> moment while I work on the refac

Re: DROP relation IF EXISTS Docs and Tests - Bug Fix

2020-07-14 Thread David G. Johnston
On Tue, Jul 14, 2020 at 7:21 AM Pavel Stehule wrote: > út 14. 7. 2020 v 16:09 odesílatel David G. Johnston < > david.g.johns...@gmail.com> napsal: > >> On Tue, Jul 14, 2020 at 6:56 AM Pavel Stehule >> wrote: >> >>> út 14. 7. 2020 v 15:55 odesíl

<    5   6   7   8   9   10   11   12   13   14   >