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

2024-07-27 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

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: INSERT ... RETURNING documentation

2024-07-25 Thread David G. Johnston
On Thursday, July 25, 2024, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/sql-insert.html > Description: > > The grammar > [ RETURNING * | output_expression [ [ AS ] output_name ] [, ...] ] > seems

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: Typo in 15.3.4

2024-07-25 Thread David G. Johnston
On Thu, Jul 25, 2024 at 9:50 AM PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/parallel-plans.html > Description: > > In section 15.3.4, I believe "multiple results sets" is a typo for > "multiple >

Re: wrong field in example

2024-07-24 Thread David G. Johnston
at 8:02 AM Yaroslav Saburov wrote: > >>because there is no single value for the column y that could be > associated with each group. > > 24 лип. 2024 р. о 17:51 David G. Johnston > пише: > >  > > > On Wed, Jul 24, 2024, 07:45 Yaroslav Saburov wrote: > >> group by y, not by x >> >> Why? > > David J. > >>

Re: wrong field in example

2024-07-24 Thread David G. Johnston
On Wednesday, July 24, 2024, David Rowley wrote: > On Thu, 25 Jul 2024, 12:57 am David G. Johnston, < > david.g.johns...@gmail.com> wrote: > >> I think you mis-copied the query - the one on the page has “select x”, >> not “select *”. >> > > That text e

Re: wrong field in example

2024-07-24 Thread David G. Johnston
On Tuesday, July 23, 2024, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/queries-table-expressions.html > Description: > > >> In the second query, we could not have written SELECT * FROM test1 GROUP

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

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

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

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 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,

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

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: A minor bug in the doc of "SQL Functions Returning Sets" in xfunc.sgml.

2024-07-18 Thread David G. Johnston
On Thu, Jul 18, 2024 at 9:05 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Thu, Jul 18, 2024 at 7:10 PM Michael Paquier > wrote: > >> Not sure that this is worth changing. The examples work OK when taken > >> in isolation or are able to

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. >

Re: A minor bug in the doc of "SQL Functions Returning Sets" in xfunc.sgml.

2024-07-18 Thread David G. Johnston
On Thu, Jul 18, 2024 at 7:10 PM Michael Paquier wrote: > On Fri, Jul 19, 2024 at 10:46:04AM +0900, 日向充 wrote: > > I have found executable examples that do not work correctly > > in the doc of "SQL Functions Returning Sets" in xfunc.sgml. > > So I fixed the examples as follows. > > The attached

Re: Regarding vacuum freeze locking mechanism

2024-07-17 Thread David G. Johnston
On Wednesday, July 17, 2024, Durgamahesh Manne wrote: > > Could you please provide more clarity on this? Which lock triggers on the > tables are being used by freeze? > https://www.postgresql.org/docs/current/explicit-locking.html Share update exclusive David J.

Re: Regarding vacuum freeze locking mechanism

2024-07-17 Thread David G. Johnston
On Wednesday, July 17, 2024, Durgamahesh Manne wrote: > when autovacuum runs , it will freeze the transaction ID (TXID) of the > table it's working on. > This statement is incorrect. A table as a whole does not have a txid. Freezing makes it so individual tuples get assigned an

Re: A minor bug in doc. Hovering over heading shows # besides it.

2024-07-17 Thread David G. Johnston
On Wednesday, July 17, 2024, Tom Lane wrote: > David Rowley writes: > > On Thu, 18 Jul 2024 at 16:55, Muhammad Ikram wrote: > >> when we hover over Table Basics, it shows # sign postfixed. I think it > needs to be removed > > > In [1], there was some talk about using another more suitable > >

Re: Column data type in doc example may be changed to VARCHAR from TEXT

2024-07-17 Thread David G. Johnston
On Wednesday, July 17, 2024, Muhammad Ikram wrote: > > > IMHO, a minor issue in the doc. As a good practice we use TEXT data type > when we expect longer text e.g. comments, doc kind of columns. > Who is we in this conversation? If it’s the documentation please reference existing work. Text

Re: A minor bug in doc. Hovering over heading shows # besides it.

2024-07-17 Thread David G. Johnston
On Wednesday, July 17, 2024, Kashif Zeeshan wrote: > > > I have checked other pages too and the issue is only with this page. > There are like thousands of them… https://www.postgresql.org/docs/current/ddl-generated-columns.html#DDL-GENERATED-COLUMNS David J.

Re: A minor bug in doc. Hovering over heading shows # besides it.

2024-07-17 Thread David G. Johnston
On Wednesday, July 17, 2024, Muhammad Ikram wrote: > > Hi, > > On page > > https://www.postgresql.org/docs/devel/ddl-basics.html > > 5.1. Table Basics # > > > when we hover over Table Basics, it shows # sign postfixed. I think

Re: Issue with configuration parameter "require_auth"

2024-07-17 Thread David G. Johnston
On Wednesday, July 17, 2024, Gaisford, Phillip wrote: > I am having trouble using require_auth (https://www.postgresql.org/ > docs/16/libpq-connect.html#LIBPQ-CONNECT-REQUIRE-AUTH). > > > > Using golang sqlx.Connect on the client side, the connection fails and my > Postgresql 16 server logs the

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 > >

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

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

Re: Code does Not Read in FY 2025 Data

2024-07-16 Thread David G. Johnston
On Tue, Jul 16, 2024 at 7:59 AM Anthony Apollis wrote: > I am using Postgres and SQL Server. > Can you test the data pls. > >> >> Well, this is a PostgreSQL community so you should target it with your communications. If you want someone to actually test things here you probably will need to

Re: 13.2.1. Read Committed Isolation Level

2024-07-16 Thread David G. Johnston
On Tue, Jul 16, 2024 at 7:06 AM PG Doc comments form wrote: > Or does it mean that contrary to Read > Committed Isolation Level, uncommitted changes from a parallel transaction > can affect the execution of an INSERT command? > This. Because you are keying off of an unique index that has

Re: Mismatch for connection key/value pair between documentation and code?

2024-07-16 Thread David G. Johnston
On Monday, July 15, 2024, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/libpq-connect.html > Description: > > > For the following document regarding connect string, it is not aligned with > the code.

Re: 13.2.2. Repeatable Read Isolation Level #

2024-07-16 Thread David G. Johnston
On Saturday, July 13, 2024, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/transaction-iso.html > Description: > > 'UPDATE, DELETE, MERGE, SELECT FOR UPDATE, and SELECT FOR SHARE commands > behave the

Re: Dropping column from big table

2024-07-15 Thread David G. Johnston
On Monday, July 15, 2024, sud wrote: > > Thank you for the confirmation. > And if someone wants to fully remove that column from the table , then the > only option is to create a new table with an exact set of active columns > and insert the data into that from the existing/old table and then

Re: Dropping column from big table

2024-07-15 Thread David G. Johnston
On Monday, July 15, 2024, David G. Johnston wrote: > On Monday, July 15, 2024, sud wrote: > >> >> However even with "vacuum full", the old rows will be removed completely >> from the storage , but the new rows will always be there with the 'dropped' >> co

Re: Dropping column from big table

2024-07-15 Thread David G. Johnston
On Monday, July 15, 2024, sud wrote: > > However even with "vacuum full", the old rows will be removed completely > from the storage , but the new rows will always be there with the 'dropped' > column still existing under the hood along with the table storage, with > just carrying "null" values

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

Re: PostgreSQL Active-Active Clustering

2024-07-15 Thread David G. Johnston
On Mon, Jul 15, 2024 at 12:06 PM Sarkar, Subhadeep wrote: > > We are evaluating features of the Community edition of PostgreSQL in > relation to a proposal for a prospective client and need help with the > queries below:- > > > >- Does the Community edition of PostgreSQL provide NATIVE >

Re: Can't find bugs to work on

2024-07-12 Thread David G. Johnston
On Fri, Jul 12, 2024 at 8:44 AM Tom Lane wrote: > > As this example shows, it's now standard for PG commit log messages > to include a link to the relevant email thread, so all you need > is the message-ID of the first message in the thread to search > the commit log with. > > Cross-posting my

Re: Savepoints in plpgsql

2024-07-12 Thread David G. Johnston
On Thursday, July 11, 2024, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/plpgsql-transactions.html > Description: > > https://www.postgresql.org/docs/current/plpgsql-transactions.html > > In this

Re: Running psql in a docker container

2024-07-11 Thread David G. Johnston
On Thu, Jul 11, 2024 at 11:16 AM H wrote: > What is the proper syntax for pgsql 16 for this? I could not get the > example given in the docs to work... > The documentation says this still works: su - postgres -c "/usr/pgsql-16/bin/initdb -D /var/lib/pgsql/16/data/ -E 'UTF-8'

Re: Query on partitioned table needs memory n_partitions * work_mem

2024-07-11 Thread David G. Johnston
On Thursday, July 11, 2024, Dimitrios Apostolou wrote:I wonder how the postgres development community is > > tracking all these issues, I've even started forgetting the ones I have > found, and I'm sure I have previously reported (on this list) a couple of > should-be-easy issues that would be

Re: How to solve my slow disk i/o throughput during index scan

2024-07-11 Thread David G. Johnston
On Thursday, July 11, 2024, FREYBURGER Simon (SNCF VOYAGEURS / DIRECTION GENERALE TGV / DM RMP YIELD MANAGEMENT) wrote: > Also, It might not be related, but I have suspiciously similar slow reads > when I am inserting in database, could it be related ? > I’m using a 3 steps process to insert my

Re: Specific objects backup in PostgreSQL

2024-07-10 Thread David G. Johnston
On Wed, Jul 10, 2024 at 11:05 AM nikhil kumar wrote: > > We received a request from client. They required all functions, stored > procedures and triggers backup. can anyone please let me know. How to take > backup only above objects. > This hardly qualifies as a performance question. You might

Re: Is it possible to create a cursor with hold using extended query protocol

2024-07-10 Thread David G. Johnston
On Wed, Jul 10, 2024 at 8:29 AM Dave Cramer wrote: > > On Wed, 10 Jul 2024 at 11:04, David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Wednesday, July 10, 2024, Dave Cramer wrote: >> >>> Greetings, >>> >>> There are

Re: Finding error in long input file

2024-07-10 Thread David G. Johnston
On Wednesday, July 10, 2024, Rich Shepard wrote: > On Wed, 10 Jul 2024, David G. Johnston wrote: > > And what are the first few lines of the file? Use text, not screenshots. >> > > David, > > insert into locations (company_nbr,loc_nbr,loc_name, > addr1,city,state_c

Re: Is it possible to create a cursor with hold using extended query protocol

2024-07-10 Thread David G. Johnston
On Wednesday, July 10, 2024, Dave Cramer wrote: > Greetings, > > There are suggestions that you can use extended query to fetch from a > cursor, however I don't see how you can bind values to the cursor ? > > PostgreSQL: Documentation: 16: FETCH >

Re: Finding error in long input file

2024-07-10 Thread David G. Johnston
On Wednesday, July 10, 2024, Rich Shepard wrote: > > Partial screenshot attached. And what are the first few lines of the file? Use text, not screenshots. David J.

Re: array_in sub function ReadArrayDimensions error message

2024-07-09 Thread David G. Johnston
hile that message fits the code aren’t we supposed to be checking, after processing all dimensions, whether the combined number of cells is greater than MaxArraySize? Obviously if any one dimension is the whole thing will be, so this specific check and error is still useful. to address David G. Joh

Re: array_in sub function ReadArrayDimensions error message

2024-07-09 Thread David G. Johnston
On Tue, Jul 9, 2024 at 8:59 AM Tom Lane wrote: > "David G. Johnston" writes: > > > I'd add a hint if the first symbol is [ and we fail to get to the point > of > > actually seeing the equal sign or the first subsequent unquoted symbol > is a > > comma in

Re: array_in sub function ReadArrayDimensions error message

2024-07-09 Thread David G. Johnston
On Tue, Jul 9, 2024 at 8:31 AM Tom Lane wrote: > > Here again, the problem is not a missing "=", it's invalid > syntax somewhere before that. > > Another thing we could consider doing here (and similarly > for your original case) is > > DETAIL: Expected "=" not "," after array dimensions. > >

Re: v16 roles, SET FALSE, INHERIT FALSE, ADMIN FALSE

2024-07-08 Thread David G. Johnston
On Mon, Jul 8, 2024 at 3:58 PM Tom Lane wrote: > I'd argue that INHERIT TRUE should be required. The point of SET TRUE > with INHERIT FALSE is that you must *explicitly* do SET ROLE or > equivalent in order to have access to the privileges of the referenced > role. I think that blast radius

Re: v16 roles, SET FALSE, INHERIT FALSE, ADMIN FALSE

2024-07-08 Thread David G. Johnston
On Mon, Jul 8, 2024 at 3:08 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Mon, Jul 8, 2024 at 2:16 PM Tom Lane wrote: > >> Pavel Luzanov writes: > > On 08.07.2024 22:22, Christophe Pettus wrote: > >>>> This is more curi

Re: v16 roles, SET FALSE, INHERIT FALSE, ADMIN FALSE

2024-07-08 Thread David G. Johnston
On Mon, Jul 8, 2024 at 2:16 PM Tom Lane wrote: > Pavel Luzanov writes: > > On 08.07.2024 22:22, Christophe Pettus wrote: > >> This is more curiosity than anything else. In the v16 role system, is > there actually any reason to grant membership in a role to a different > role, but with SET

Re: v16 roles, SET FALSE, INHERIT FALSE, ADMIN FALSE

2024-07-08 Thread David G. Johnston
On Monday, July 8, 2024, Christophe Pettus wrote: > > > > On Jul 8, 2024, at 13:29, Christophe Pettus wrote: > > > > > > > >> On Jul 8, 2024, at 13:25, Laurenz Albe > wrote: > >> I didn't test it, but doesn't that allow the member rule to drop > objects owned > >> be the role it is a member

Re: v16 roles, SET FALSE, INHERIT FALSE, ADMIN FALSE

2024-07-08 Thread David G. Johnston
On Mon, Jul 8, 2024 at 12:23 PM Christophe Pettus wrote: > > This is more curiosity than anything else. In the v16 role system, is > there actually any reason to grant membership in a role to a different > role, but with SET FALSE, INHERIT FALSE, and ADMIN FALSE? Does the role > granted

Re: ❓ JSON Path Dot Precedence

2024-07-08 Thread David G. Johnston
On Mon, Jul 8, 2024 at 9:12 AM David E. Wheeler wrote: > On Jul 8, 2024, at 12:05, David G. Johnston > wrote: > > > Does the standard even have a separate type here or is that our > implementation detail invention? > > Sorry, separate type for what? > > We creat

Re: ❓ JSON Path Dot Precedence

2024-07-08 Thread David G. Johnston
On Mon, Jul 8, 2024 at 8:27 AM David E. Wheeler wrote: > Hi, following up on some old threads. > > > On Apr 10, 2024, at 16:44, David E. Wheeler > wrote: > > > > That makes sense, thanks. It’s just a little odd to me that the > resulting path isn’t a query at all. To Erik’s point: what path can

Re: Declaring a field that is also an out parameter in a function

2024-07-07 Thread David G. Johnston
On Sunday, July 7, 2024, Michael Nolan wrote: > On Sun, Jul 7, 2024 at 4:13 AM Pavel Stehule > wrote: > > > > but looks so there are false alarms related to using an alias. It is > interesting so I have not any report about this issue, so probably using > aliases is not too common today. > >

Re: Should we document how column DEFAULT expressions work?

2024-07-05 Thread David G. Johnston
On Fri, Jul 5, 2024 at 2:11 PM Bruce Momjian wrote: > > If I remove the 'now()' mention in the docs, patch attached, I am > concerned people will be confused whether it is the removal of the > single quotes or the use of "()" which causes insert-time evaluation, > and they might try 'now()'. > >

Re: Should we document how column DEFAULT expressions work?

2024-07-05 Thread David G. Johnston
On Fri, Jul 5, 2024 at 1:55 PM Bruce Momjian wrote: > On Fri, Jul 5, 2024 at 04:50:32PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > Also interestingly, "now" without quotes requires parentheses to make > it > > > a function call: > > > > I'm not sure why you find that surprising, or

Re: Removing the default grant of EXECUTE on functions/procedures to PUBLIC

2024-07-05 Thread David G. Johnston
On Friday, July 5, 2024, Tefft, Michael J wrote: > I am trying to remove the default grant of EXECUTE on all > functions/procedures to PUBLIC. > > From my reading, there is no straightforward way to do this. For example, > > ALTER DEFAULT PRIVILEGES REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC; > >

Re: Design strategy for table with many attributes

2024-07-04 Thread David G. Johnston
On Thursday, July 4, 2024, Lok P wrote: > > But do you also suggest keeping those table pieces related to each other > through the same primary key ? > > Yes, everyone row produced from the input data “row” should get the same ID associated with it - either as an entire PK or a component of a

Re: psql help

2024-07-04 Thread David G. Johnston
The convention here is to in-line replies, or bottom-post. Top-posting makes the archives more difficult to read. On Thursday, July 4, 2024, Murthy Nunna wrote: > pg_terminate_backend(pid) will not work as it expects only one pid at a > time. > > > Interesting…I wouldn’t expect the function

Re: psql help

2024-07-04 Thread David G. Johnston
On Thu, Jul 4, 2024 at 4:56 PM Murthy Nunna wrote: > > > How can I rewrite the above in psql > The only real trick is using a psql variable instead of the shell-injection of the environment variable. Use the --set CLI argument to assign the environment variable to a psql variable then refer to

Re: JSONPath operator and escaping values in query

2024-07-04 Thread David G. Johnston
On Thu, Jul 4, 2024 at 1:57 PM Vasu Nagendra wrote: > > > SELECT '{"n": {"a-b": 1, "@ab": 2, "ab": 3}}'::jsonb @? '$ ? (@.n.a\-b >= 3)'; > > Which is better written as: select '{"n": {"a-b": 1, "@ab": 2, "ab": 3}}'::jsonb @? '$ ? (@.n."a-b" >= 3)'; Using the same double-quotes you defined the

Re: Design strategy for table with many attributes

2024-07-04 Thread David G. Johnston
On Thu, Jul 4, 2024 at 12:38 PM Lok P wrote: > > Should we break the single transaction into multiple tables like one main > table and other addenda tables with the same primary key to join and fetch > the results wherever necessary? > > I would say yes. Find a way to logically group sets of

Re: Unknown annotation '-cim' in source code

2024-07-03 Thread David G. Johnston
On Wed, Jul 3, 2024 at 8:46 PM Steve Lau wrote: > > While reading the source code, I noticed comments like "-cim 9/10/89". I > think this might be an annotation by a developer to indicate the commit > time, but from the commit history (using git), they does not seem to match. > It's the

Re: Accommodating alternative column values

2024-07-03 Thread David G. Johnston
On Wed, Jul 3, 2024 at 7:13 AM Rich Shepard wrote: > On Wed, 3 Jul 2024, David G. Johnston wrote: > > > Yeah, the simply cast suggested will not work. You’d have to apply an > > expression that turns the current contents into an array. The current > > contents are n

Re: Accommodating alternative column values

2024-07-03 Thread David G. Johnston
On Wednesday, July 3, 2024, Rich Shepard wrote: > On Wed, 3 Jul 2024, Rich Shepard wrote: > > What I've tried: >> bustrac=# alter table people alter column email set data type varchar(64) >> []; >> ERROR: column "email" cannot be cast automatically to type character >> varying[] >> HINT: You

Re: Accommodating alternative column values

2024-07-03 Thread David G. Johnston
On Wednesday, July 3, 2024, Rich Shepard wrote: > > I'm not using the proper syntax and the postgres alter table doc has no > example in the alter column choices. Simpler syntax forms tend to get skipped over when doing examples. > > How do I incorporate the "USING email::..." string? >

Re: COALESCE documentation

2024-07-03 Thread David G. Johnston
On Wednesday, July 3, 2024, Navrátil, Ondřej wrote: > > To get back to my "docs patch proposal" - I could submit a patch if you > would kindly point me where to start. I would also prefer to submit such a > patch only after it is decided whether this is a docs bug or impl bug, and > whether or

Re: Logical replication with temporary tables

2024-07-02 Thread David G. Johnston
On Tuesday, July 2, 2024, Stuart Campbell wrote: > This is a question for AWS. Community PostgreSQL doesn't have any of >> these concepts, and this is all proprietary modifications to PostgreSQL by >> Amazon. > > > Maybe my question can be re-summarised as: do DDL operations on temporary >

Re: Should we document how column DEFAULT expressions work?

2024-06-30 Thread David G. Johnston
On Sun, Jun 30, 2024 at 7:52 PM David Rowley wrote: > If that's the case, maybe a tiny step towards what Peter proposed is > just to make trailing punctuation fail for timestamp special values in > v18. > > I'm game. If anyone is using the ambiguous spelling it is probably to their benefit to

Re: Should we document how column DEFAULT expressions work?

2024-06-30 Thread David G. Johnston
On Sun, Jun 30, 2024 at 7:52 PM David Rowley wrote: > On Mon, 1 Jul 2024 at 13:41, David G. Johnston > wrote: > > I presume the relatively new atomic SQL functions pose a similar hazard. > > Do you have an example of this? > > create function testnow() returns timesta

Re: Should we document how column DEFAULT expressions work?

2024-06-30 Thread David G. Johnston
On Sun, Jun 30, 2024 at 5:47 PM David Rowley wrote: > On Mon, 1 Jul 2024 at 12:16, David G. Johnston > wrote: > > > > On Sun, Jun 30, 2024 at 4:55 PM David Rowley > wrote: > >> > >> > >> I'd like to know what led someone down the path of doin

Re: Should we document how column DEFAULT expressions work?

2024-06-30 Thread David G. Johnston
On Sun, Jun 30, 2024 at 4:55 PM David Rowley wrote: > > I'd like to know what led someone down the path of doing something > like DEFAULT 'now()'::timestamp in a CREATE TABLE. Could it be a > faulty migration tool that created these and people copy them thinking > it's a legitimate syntax? > >

Re: Missing information on '-X' in section 26.3.6.1.

2024-06-28 Thread David G. Johnston
On Fri, Feb 2, 2024 at 12:41 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > > The attached patch moves this paragraph there. I distilled the paragraph > down to its essence, but am open to being a bit more wordy, and consider > more how this fits into th

Doc: Move standalone backup section, mention -X argument

2024-06-28 Thread David G. Johnston
A documentation comment came in [1] causing me to review some of our backup documentation and I left the current content and location of the standalone backups was odd. I propose to move it to a better place, under file system backups. Adding to commitfest. David J. [1]

Re: SQL/JSON query functions context_item doc entry and type requirement

2024-06-27 Thread David G. Johnston
On Thursday, June 20, 2024, David G. Johnston wrote: > >> > >> > > As for table 9.16.3 - it is unwieldy already. Lets try and make the >> core syntax shorter, not longer. We already have precedence in the >> subsequent json_table section - give each ma

Re: Is missing LOGIN Event on Trigger Firing Matrix ?

2024-06-27 Thread David G. Johnston
On Thu, Jun 27, 2024 at 12:39 PM Andrew Dunstan wrote: > On 2024-06-27 Th 2:40 PM, Marcos Pegoraro wrote: > > create event trigger ... on login is now available but it is not shown on > DOCs or is it in another page ? > > https://www.postgresql.org/docs/devel/event-trigger-matrix.html > doesn't

Re: Custom type's modifiers

2024-06-27 Thread David G. Johnston
On Thu, Jun 27, 2024 at 8:49 AM Marthin Laubscher wrote: > > I suppose when a cast is involved it goes via the external format as well, > right? > A cast between two types is going to accept a concrete instance of the input type, in memory, as its argument and then produces a concrete instance

Re: dblink Future support vs FDW

2024-06-27 Thread David G. Johnston
On Thursday, June 27, 2024, Dhritman Roy wrote: > > This is my attempt to seek support at PostGreSQL.So, if I have broken any > protocols/rules or violated any code of conduct then please do forgive and > guide me. Thanks. > > The G is not capitalized. > I know we can use FDW but our teams are

Re: A way to optimize sql about the last temporary-related row

2024-06-27 Thread David G. Johnston
On Thursday, June 27, 2024, aghart...@gmail.com wrote: > > Now the query: > explain (verbose, buffers, analyze) > with last_table_ids as materialized( > select xx from ( > select LAST_VALUE(pk_id) over (partition by integer_field_2 order by > datetime_field_1 RANGE BETWEEN UNBOUNDED

Re: Should we document how column DEFAULT expressions work?

2024-06-26 Thread David G. Johnston
On Tuesday, June 25, 2024, James Coleman wrote: > Hello, > > It's possible I'm the only one who's been in this situation, but I've > multiple times found myself explaining to a user how column DEFAULT > expressions work: namely how the quoting on an expression following > the keyword DEFAULT

Re: pgsql: doc PG 17 relnotes: add item about pg_collation column renames

2024-06-26 Thread David G. Johnston
On Wed, Jun 26, 2024 at 10:14 AM Bruce Momjian wrote: > doc PG 17 relnotes: add item about pg_collation column renames > > + pg_collation.daticulocale The daticulocale name (dat prefix) exists on pg_database, not pg_collation. David J.

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-26 Thread David G. Johnston
On Wed, Jun 26, 2024 at 8:47 AM Nathan Bossart wrote: > On Wed, Jun 26, 2024 at 07:58:55AM -0700, David G. Johnston wrote: > > On Wed, Jun 26, 2024 at 7:52 AM Joel Jacobson wrote: > >> Want me to fix that or will the committer handle that? > >> > >

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-26 Thread David G. Johnston
On Wed, Jun 26, 2024 at 7:52 AM Joel Jacobson wrote: > On Wed, Jun 26, 2024, at 02:59, David G. Johnston wrote: > > Though there was no comment on the fact we should be linking to: > > > > https://en.wikipedia.org/wiki/Access-control_list > > > > not: >

Re: Wrong security context for deferred triggers?

2024-06-26 Thread David G. Johnston
On Wed, Jun 26, 2024 at 2:02 AM Laurenz Albe wrote: > > I think that we should have some consensus about the following before > we discuss syntax: > > - Does anybody depend on the current behavior and would be hurt if > my current patch went in as it is? > > - Is this worth changing at all or

Re: current_role of caller of a DEFINER function

2024-06-26 Thread David G. Johnston
On Wednesday, June 26, 2024, Dominique Devienne wrote: > Only session_user > is representative of the caller, and reliable (modulo SUPERUSER and > SET AUTHORIZATION, but that's a different story and kinda normal) > Why can you not use session_user then? David J.

Re: Should we document how column DEFAULT expressions work?

2024-06-26 Thread David G. Johnston
On Tue, Jun 25, 2024 at 10:12 PM Tom Lane wrote: > David Rowley writes: > > If people don't properly understand these special timestamp input > > values, then maybe the documentation in [1] needs to be improved. At > > the moment the details are within parentheses. Namely "(In particular, > >

Re: Should we document how column DEFAULT expressions work?

2024-06-25 Thread David G. Johnston
On Tue, Jun 25, 2024 at 9:50 PM David Rowley wrote: > On Wed, 26 Jun 2024 at 13:31, David G. Johnston > wrote: > > I'd suggest adding to: > > > > DEFAULT default_expr > > The DEFAULT clause assigns a default data value for the column whose > column definition it

Re: Should we document how column DEFAULT expressions work?

2024-06-25 Thread David G. Johnston
On Tue, Jun 25, 2024 at 4:11 PM Tom Lane wrote: > James Coleman writes: > > On Tue, Jun 25, 2024 at 4:59 PM Tom Lane wrote: > >> Uh ... what? I recall something about that with respect to certain > >> features such as nextval(), but you're making it sound like there > >> is something generic

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-25 Thread David G. Johnston
On Mon, Jun 24, 2024 at 10:11 PM Michael Paquier wrote: > On Tue, Jun 25, 2024 at 12:20:20AM +0200, Joel Jacobson wrote: > > Thanks, much better. New version attached. > > + The PostgreSQL documentation, and code, > refers > + to the specifications within the ACL as "privileges". This

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-25 Thread David G. Johnston
On Tue, Jun 25, 2024 at 5:30 PM Michael Paquier wrote: > On Tue, Jun 25, 2024 at 11:55:03AM -0500, Nathan Bossart wrote: > > On Tue, Jun 25, 2024 at 08:10:24AM +0200, Joel Jacobson wrote: > > > On Tue, Jun 25, 2024, at 07:11, Michael Paquier wrote: > > >> v1 is fine without the "privileges list"

Re: psql (PostgreSQL) 17beta2 (Debian 17~beta2-1.pgdg+~20240625.1534.g23c5a0e) Failed to retrieve data from the server..

2024-06-25 Thread David G. Johnston
On Tue, Jun 25, 2024 at 5:36 PM André Verwijs wrote: > psql (PostgreSQL) 17beta2 (Debian 17~beta2-1.pgdg+~20240625.1534.g23c5a0e) > column "daticulocale" does not exist > LINE 5: datconnlimit, daticulocale, daticurules, datcollversion, > ^ > HINT: Perhaps you meant to reference the column

Re: improve predefined roles documentation

2024-06-25 Thread David G. Johnston
On Tue, Jun 25, 2024 at 1:19 PM Nathan Bossart wrote: > On Tue, Jun 25, 2024 at 04:04:03PM -0400, Robert Haas wrote: > > Looking at this again, how happy are you with the way you've got > > several roles per instead of one for each? I realize > > that was probably part of the intent of the

Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-06-25 Thread David G. Johnston
Hey! Lots of SQL/JSON threads going about. This one is less about technical correctness and more about usability of the documentation. Though in writing this I am finding some things that aren't quite clear. I'm going to come back with those on a follow-on post once I get a chance to make my

Re: improve predefined roles documentation

2024-06-24 Thread David G. Johnston
On Mon, Jun 24, 2024 at 2:53 PM Nathan Bossart wrote: > On Mon, Jun 24, 2024 at 02:44:33PM -0400, Robert Haas wrote: > > > I don't know what to do about pg_database_owner. I almost wonder if > > that should be moved out of the table and documented as a special > > case. Or maybe some more

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-24 Thread David G. Johnston
On Mon, Jun 24, 2024 at 1:49 PM Joel Jacobson wrote: > How about? > > + > + The linked page uses "permissions" while we consistently use the > synonym > + "privileges", to describe the contents of the list. For avoidance of > + doubt and clarity, these two terms are

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-24 Thread David G. Johnston
On Mon, Jun 24, 2024 at 12:46 PM Joel Jacobson wrote: > On Mon, Jun 24, 2024, at 18:02, David G. Johnston wrote: > > > The page we link to uses "permissions" while we consistently use > > "privileges" to describe the contents of the list. This seems like an

  1   2   3   4   5   6   7   8   9   10   >