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

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

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: roles that have the CREATEROLE privilege can no longer GRANT predefined roles

2024-05-13 Thread David G. Johnston
On Thu, May 2, 2024 at 3:36 AM Laurenz Albe wrote: > On Wed, 2024-05-01 at 16:09 +, PG Doc comments form wrote: > > Page: https://www.postgresql.org/docs/16/predefined-roles.html > > > > roles that have the CREATEROLE privilege can no longer GRANT predefined > > roles unless they are part of

Re: how to completely turn off statement error logging

2024-05-13 Thread David G. Johnston
On Monday, May 13, 2024, Zwettler Markus (OIZ) wrote: > > > but I do not want to suppress errors that are related to infrastructure > problems, i.e. "could not open file..." > > The server doesn’t classify the errors it emits into scope, “application errors” and ”infrastructure errors”, or

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: 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: 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: Is there an undocumented Syntax Check in Meson?

2024-05-09 Thread David G. Johnston
On Thu, May 9, 2024 at 12:12 PM Dagfinn Ilmari Mannsåker wrote: > "David G. Johnston" writes: > > > I've been using "ninja html" which isn't shown here. > > The /devel/ version has a link to the full list of doc targets: > > > https://www.postg

Is there an undocumented Syntax Check in Meson?

2024-05-09 Thread David G. Johnston
$subject Make has one: https://www.postgresql.org/docs/current/docguide-build.html#DOCGUIDE-BUILD-SYNTAX-CHECK This needs updating: https://www.postgresql.org/docs/current/docguide-build-meson.html I've been using "ninja html" which isn't shown here. Also, as a sanity check, running that

Re: request for database identifier in the startup packet

2024-05-09 Thread David G. Johnston
On Thursday, May 9, 2024, Dave Cramer wrote: > Greetings, > > The JDBC driver is currently keeping a per connection cache of types in > the driver. We are seeing cases where the number of columns is quite high. > In one case Prevent fetchFieldMetaData() from being run when unnecessary. > · Issue

Re: PERIOD foreign key feature

2024-05-07 Thread David G. Johnston
On Tue, May 7, 2024 at 7:54 AM Bruce Momjian wrote: > In this commit: > > commit 34768ee3616 > Author: Peter Eisentraut > Date: Sun Mar 24 07:37:13 2024 +0100 > > Add temporal FOREIGN KEY contraints > > Add PERIOD clause to foreign key

Re: Increase the length of identifers from 63 characters to 128 characters or more

2024-05-06 Thread David G. Johnston
On Monday, May 6, 2024, Peter Burbery wrote: > > Business Use-case: I want to create a table named things_that_take_up_a_ > lot_of_storage_and_space_on_a_computer_and_hard_drive of 75 characters. I > also want to create a column named thing_that_takes_up_a_ >

Re: RETURNING order guarantees documentation

2024-05-04 Thread David G. Johnston
On Sat, May 4, 2024, 10:13 Dan Wainwright wrote: > > 'Similar to' doesn't provide anything concrete to the reader. There was a > thread > on [Hackers] > > back in 2015 proposing some docs to clearly explain that ordering

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread David G. Johnston
On Friday, May 3, 2024, Adrian Klaver wrote: > > Have you met people? > I really don’t care enough to try and actually make converts here. It would have been a perfectly justifiable design choice to make our “pattern” matching case-insensitive by default, probably with a case-sensitive mode

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread David G. Johnston
On Friday, May 3, 2024, Tom Lane wrote: > > > By and large, I'd expect people using mixed-case table names to get > accustomed pretty quickly to the fact that they have to double-quote > those names in SQL. I don't see why it's a surprise that that is also > true in \d commands. > > Every day

Re: Question regarding how databases support atomicity

2024-05-03 Thread David G. Johnston
On Friday, May 3, 2024, David G. Johnston wrote: > On Friday, May 3, 2024, Siddharth Jain wrote: > >> >> >> On Fri, May 3, 2024 at 8:00 PM Siddharth Jain wrote: >> >>> >>> >>> The way I understand this is that if there is a failure in

Re: Question regarding how databases support atomicity

2024-05-03 Thread David G. Johnston
On Friday, May 3, 2024, Siddharth Jain wrote: > > > On Fri, May 3, 2024 at 8:00 PM Siddharth Jain wrote: > >> I am trying to sharpen my understanding of databases. Let's say there is >> an operation foo as part of the public API that internally translates to >> more than 1 operation - I am sure

Re: Proposal for CREATE OR REPLACE EVENT TRIGGER in PostgreSQL

2024-05-03 Thread David G. Johnston
On Friday, May 3, 2024, Peter Burbery wrote: > Dear pgsql-hackers, > > One-line Summary: > Proposal to introduce the CREATE OR REPLACE syntax for EVENT TRIGGER in > PostgreSQL. > > Business Use-case: > Currently, to modify an EVENT TRIGGER, one must drop and recreate it. This > proposal aims to

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread David G. Johnston
On Fri, May 3, 2024 at 2:08 PM Adrian Klaver wrote: > On 5/3/24 14:06, Magnus Hagander wrote: > > > > > > On Fri, May 3, 2024 at 10:58 PM David Gauthier > > wrote: > > > > psql (15.3, server 14.5) on linux > > > > Someone else's DB which I've been asked to

Re: Document NULL

2024-05-03 Thread David G. Johnston
On Fri, May 3, 2024 at 8:44 AM Tom Lane wrote: > "David G. Johnston" writes: > > On Fri, May 3, 2024 at 7:10 AM Peter Eisentraut > > wrote: > >> On 02.05.24 17:23, David G. Johnston wrote: > >>> I chose to add a new sect1 in the user g

Re: Document NULL

2024-05-03 Thread David G. Johnston
On Fri, May 3, 2024 at 7:10 AM Peter Eisentraut wrote: > On 02.05.24 17:23, David G. Johnston wrote: > > Version 2 attached. Still a draft, focused on topic picking and overall > > structure. Examples and links planned plus the usual semantic markup > stuff. > > > &

Re: Document NULL

2024-05-03 Thread David G. Johnston
On Fri, May 3, 2024 at 1:14 AM jian he wrote: > On Fri, May 3, 2024 at 2:47 PM Laurenz Albe > wrote: > > > > On Thu, 2024-05-02 at 08:23 -0700, David G. Johnston wrote: > > > Version 2 attached. Still a draft, focused on topic picking and > overall structu

Re: Document NULL

2024-05-02 Thread David G. Johnston
One easily made because we assume if you are here you "know" what data is, but there is still stuff to be discussed, if nothing else to establish a common understanding between us and our users. David J. From 7798121992154edab4768d7eab5a89be04730b2f Mon Sep 17 00:00:00 2001 From: &qu

Re: EXPLAN redundant options

2024-05-02 Thread David G. Johnston
On Thu, May 2, 2024 at 6:17 AM jian he wrote: > explain (verbose, verbose off, analyze on, analyze off, analyze on) > > I would just update this paragraph to note the last one wins behavior. "When the option list is surrounded by parentheses, the options can be written in any order. However,

Re: Prevent users from executing pg_dump against tables

2024-05-02 Thread David G. Johnston
On Wednesday, May 1, 2024, RAJAMOHAN wrote: > > Main reason being I don't want the data to be copied from the database to > their local machines. > You cannot stop it being copied to their local machine, you can only make it difficult. And really not that difficult. Trust but verify - i.e.,

Document NULL

2024-05-01 Thread David G. Johnston
in its own file. David J. [1] https://www.postgresql.org/message-id/1859814.1714532025%40sss.pgh.pa.us From a068247e92e620455a925a0ae746adc225ae1339 Mon Sep 17 00:00:00 2001 From: "David G. Johnston" Date: Wed, 1 May 2024 07:45:48 -0700 Subject: [PATCH] Document NULL --- doc/src/sgm

Re: Introduction of a new field in pg_class indicating presence of a large object in a table

2024-04-30 Thread David G. Johnston
On Tue, Apr 30, 2024 at 11:57 AM Gaurav Pant wrote: > I wanted to know if there is any such system table that we can use to > identify and map the fields containing large objects and the respective > tables and if it is not already there, do we have any plans to incorporate > the same in

Re: DROP OWNED BY fails to clean out pg_init_privs grants

2024-04-29 Thread David G. Johnston
On Monday, April 29, 2024, Tom Lane wrote: > "David G. Johnston" writes: > > My solution to this was to rely on the fact that the bootstrap superuser > is > > assigned OID 10 regardless of its name. > > Yeah, I wrote it that way to start with too, but reconside

Re: DROP OWNED BY fails to clean out pg_init_privs grants

2024-04-29 Thread David G. Johnston
On Monday, April 29, 2024, Tom Lane wrote: > Daniel Gustafsson writes: > >> On 28 Apr 2024, at 20:52, Tom Lane wrote: > > > >> This is of course not bulletproof: with a sufficiently weird > >> bootstrap superuser name, we could get false matches to parts > >> of "regress_dump_test_role" or to

Re: pg_input_error_info doc 2 exampled crammed together

2024-04-28 Thread David G. Johnston
On Sunday, April 28, 2024, Michael Paquier wrote: > On Sun, Apr 28, 2024 at 06:45:30PM -0700, David G. Johnston wrote: > > My preference would be to limit this section to a single example. The > > numeric one, as it provides values for more output columns. I would > cha

Re: pg_input_error_info doc 2 exampled crammed together

2024-04-28 Thread David G. Johnston
On Sunday, April 28, 2024, jian he wrote: > > > after checking the definition of [1], [2], > maybe here we should use > Possibly, though I’d be curious to see how consistent we are on this point elsewhere before making a point of it. > > and also add `(1 row)` information. Doesn’t seem

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2024-04-28 Thread David G. Johnston
On Sunday, April 28, 2024, Alexander Lakhin wrote: > > When we deal with mixed ownership, say, bob is an owner of a > partitioned table, but not an owner of a partition, should we > allow him to perform merge with that partition? > > Attaching via alter table requires the user to own both the

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2024-04-28 Thread David G. Johnston
On Sunday, April 28, 2024, Alexander Lakhin wrote: > > When we deal with mixed ownership, say, bob is an owner of a > partitioned table, but not an owner of a partition, should we > allow him to perform merge with that partition? > > IIUC Merge causes the source tables to be dropped, their data

Re: show fct_name of the function/procedure

2024-04-27 Thread David G. Johnston
On Saturday, April 27, 2024, ft wrote: > > fct_name text := pg_fct_name(); -- I need it > > https://www.postgresql.org/docs/current/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS PG_ROUTINE_OID I think casting that to “regproc” will get you what you need. Otherwise there should

Re: Stess test via libpq for postgreSQL DB

2024-04-27 Thread David G. Johnston
On Sat, Apr 27, 2024 at 11:07 AM Sasmit Utkarsh wrote: > > But i have some clarifications if we can use it to execute PLSQL code > blocks rather than standalone SQL queries. > https://www.postgresql.org/docs/current/sql-do.html David J.

Re: Read table rows in chunks

2024-04-27 Thread David G. Johnston
On Sat, Apr 27, 2024 at 12:47 AM Sushrut Shivaswamy < sushrut.shivasw...@gmail.com> wrote: > > I"m trying to read the rows of a table in chunks to process them in a > background worker. > This list really isn't the place for this kind of discussion. You are doing application-level stuff, not

Re: query_id, pg_stat_activity, extended query protocol

2024-04-27 Thread David G. Johnston
On Sat, Apr 27, 2024 at 6:55 AM Imseih (AWS), Sami wrote: > > Hmm, you raise a good point. Isn't this a fundamental problem > with prepared statements? If there is DDL on the > relations of the prepared statement query, shouldn't the prepared > statement be considered invalid at that point and

Re: Partitioned tables and [un]loggedness

2024-04-24 Thread David G. Johnston
On Wed, Apr 24, 2024 at 4:35 PM Michael Paquier wrote: > > I disagree here, actually. Temporary tables are a different beast > because they require automated cleanup which would include interacting > with the partitionining information if temp and non-temp relations are > mixed. That's why the

Re: Partitioned tables and [un]loggedness

2024-04-24 Thread David G. Johnston
On Wed, Apr 24, 2024 at 1:26 PM Nathan Bossart wrote: > On Wed, Apr 24, 2024 at 04:17:44PM +0900, Michael Paquier wrote: > > - Support ALTER TABLE .. SET LOGGED/UNLOGGED for partitioned tables, > > where the command only works on partitioned tables so that's only a > > catalog switch. > > I'm

Re: doc: create table improvements

2024-04-24 Thread David G. Johnston
On Wed, Apr 24, 2024 at 7:45 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Apr 24, 2024 at 3:30 AM Peter Eisentraut > wrote: > >> > + The reliability characteristics of a table are governed by its >> > + persistence mode. The default

Re: doc: create table improvements

2024-04-24 Thread David G. Johnston
On Wed, Apr 24, 2024 at 3:30 AM Peter Eisentraut wrote: > > + The reliability characteristics of a table are governed by its > > + persistence mode. The default mode is described > > + here > > + There are two alternative modes that can be specified during > > + table creation: >

Re: Password forgotten

2024-04-23 Thread David G. Johnston
On Tuesday, April 23, 2024, Arbol One wrote: > Hello. > In my Debian box, after entering this command to psql-16, *psql -h > localhost -U postgres* > > psql-16 asks for the password, which I have forgotten. > So I get this message: > > > > *psql: error: connection to server at "localhost" (::1),

Re: issue with reading hostname

2024-04-22 Thread David G. Johnston
On Mon, Apr 22, 2024 at 2:54 PM Atul Kumar wrote: > I mean, Once I change the hostname then how will the socket read the new > hostname ? Does it require a postgres service restart ? > >> >> -h doesn't strictly mean hostname (the wording choice here does seem problematic), rather it is simply a

Re: issue with reading hostname

2024-04-22 Thread David G. Johnston
On Mon, Apr 22, 2024 at 1:14 PM Atul Kumar wrote: > > so below are my questions: > > 1. Is the psql client reading the socket file that resides in the /tmp > directory to fetch the hostname ? > > 2. I saw the socket file in /tmp and it is empty. Then how is the psql > client still reading the

Re: [Doc] Improvements to ddl.sgl Privileges Section and Glossary

2024-04-22 Thread David G. Johnston
Any thoughts? On Thu, Jan 25, 2024 at 1:59 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > Hey, > > In a nearby user complaint email [1] some missing information regarding > ownership reassignment came to light. I took that and went a bit further > to add wh

Re: [Doc] Improve hostssl related descriptions and option presentation

2024-04-22 Thread David G. Johnston
Thoughts anyone? On Thu, Feb 1, 2024 at 3:47 PM David G. Johnston wrote: > Motivated by a recent complaint [1] I found the hostssl related material > in our docs quite verbose and even repetitive. Some of that is normal > since we have both an overview/walk-through sectio

Re: altering a column to to make it generated

2024-04-22 Thread David G. Johnston
On Mon, Apr 22, 2024 at 12:42 PM Celia McInnis wrote: > Can I alter a table column to now make it generated? I tried this > unsuccessfully: > I looked at all of the "alter table ... alter column" commands listed here: https://www.postgresql.org/docs/current/sql-altertable.html And none seem

doc: create table improvements

2024-04-22 Thread David G. Johnston
not so is discovered by their omission when discussing those topics. [1] https://www.postgresql.org/message-id/flat/15954-b61523bed4b110c4%40postgresql.org From e375044d55809d239be33f31c4efa8410790d3f0 Mon Sep 17 00:00:00 2001 From: "David G. Johnston" Date: Mon, 22 Apr 2024 11:51:53 -070

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread David G. Johnston
On Mon, Apr 22, 2024, 08:37 Ron Johnson wrote: > On Mon, Apr 22, 2024 at 10:25 AM Tom Lane wrote: > >> Marcos Pegoraro writes: >> > But wouldn't it be good that VACUUM FULL uses that index defined by >> > Cluster, if it exists ? >> >> No ... what would be the difference then? >> > > What the

Re: Not able to grant access on pg_signal_backend on azure flexible server

2024-04-22 Thread David G. Johnston
On Sun, Apr 21, 2024 at 10:49 PM Saksham Joshi wrote: > We have tried granting it with our admin user also but no avail. > This is how v16+ works in a community installation: postgres=1 # create role cr createrole; CREATE ROLE postgres 2=# set role cr; SET postgres 2=> create role otherrole;

Re: Not able to grant access on pg_signal_backend on azure flexible server

2024-04-21 Thread David G. Johnston
On Sunday, April 21, 2024, Saksham Joshi wrote: > Hi, > I am afraid that's not the case with postgresql 16 since we also tested > with postgresql 15 we are able to run this command( "GRANT > pg_signal_backend To "our_admin_user") successfully with our admin user but > that's not the case with

query multiple schemas

2024-04-21 Thread David G. Johnston
On Sunday, April 21, 2024, Norbert Sándor wrote: > > > The structure of each schema is identical, the tenant ID is the name of > the schema. > You’ve hit the main reason why the scheme you choose is usually avoided. Better to just add tenant_id to your tables in the first place. And use

Re: error in trigger creation

2024-04-21 Thread David G. Johnston
On Sun, Apr 21, 2024 at 11:20 AM yudhi s wrote: > > On Sun, Apr 21, 2024 at 8:13 PM Tom Lane wrote: > >> "David G. Johnston" writes: >> > On Sunday, April 21, 2024, yudhi s wrote: >> >> Are you saying something like below, in which we f

Re: error in trigger creation

2024-04-21 Thread David G. Johnston
On Sun, Apr 21, 2024 at 11:10 AM yudhi s wrote: > > On Sun, Apr 21, 2024 at 7:55 PM David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Sunday, April 21, 2024, yudhi s wrote: >> >>> On Sun, Apr 21, 2024 at 1:55 PM David G. Johnston

Re: error in trigger creation

2024-04-21 Thread David G. Johnston
On Sunday, April 21, 2024, yudhi s wrote: > On Sun, Apr 21, 2024 at 1:55 PM David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Sunday, April 21, 2024, yudhi s wrote: >> >>> so that it will be able to assign the privilege, so we will be able to

Re: error in trigger creation

2024-04-21 Thread David G. Johnston
On Sunday, April 21, 2024, yudhi s wrote: > so that it will be able to assign the privilege, so we will be able to > create the event trigger without need to run the event trigger script from > super user itself? > Write a security-definer function owned by superuser and grant app_user

Re: Update Help on PREPARE to mention DEALLOCATE

2024-04-16 Thread David G. Johnston
On Tue, Apr 16, 2024 at 1:27 PM Kirk Wolak wrote: > Could we make the PREPARE line read > > PREPARE [ DEALLOCATE ] ...? > > So it's more consistent, and the user using a PREPARE gets a clue to > DEALLOCATE? > > No. That is a syntax excerpt and the prepare command doesn't accept an optional

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

2024-04-15 Thread David G. Johnston
On Sun, Feb 18, 2024 at 4:14 AM Pavel Luzanov wrote: > 2. Tom's advise: > > Not sure it's worth worrying about > > Show real values for 'Valid until' and 'Connection limit' without any hints. > > At this point I'm on board with retaining the \dr charter of simply being an easy way to access the

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

2024-04-15 Thread David G. Johnston
On Sat, Apr 13, 2024 at 7:02 PM Wen Yi wrote: > I think we can change the output like this: > > postgres=# \du > List of roles > Role name | Login | Attributes | Password | Valid until | Connection > limit > >

Re: Stability of queryid in minor versions

2024-04-14 Thread David G. Johnston
On Sun, Apr 14, 2024 at 7:03 PM David Rowley wrote: > On Mon, 15 Apr 2024 at 13:37, David G. Johnston > wrote: > > Seems we can improve things by simply removing the "rule of thumb" > sentence altogether. The prior paragraph states the things the queryid > depends

Re: constant crashing

2024-04-14 Thread David G. Johnston
On Sun, Apr 14, 2024 at 6:58 PM jack wrote: > But the current i9 machine is a machine from only 4 years ago which should > have no issues. > > That is a non sequitur. Besides, if the current code is a representative example you've probably given it the effective usage of 8 years. Whether

Re: Stability of queryid in minor versions

2024-04-14 Thread David G. Johnston
On Sun, Apr 14, 2024 at 6:32 PM David Rowley wrote: > On Mon, 15 Apr 2024 at 13:19, Tom Lane wrote: > > > > Michael Paquier writes: > > > On Mon, Apr 15, 2024 at 11:20:16AM +1200, David Rowley wrote: > > >> 1. We cannot change Node enums in minor versions > > >> 2. We're *unlikely* to add

Re: Stability of queryid in minor versions

2024-04-14 Thread David G. Johnston
On Sun, Apr 14, 2024 at 4:20 PM David Rowley wrote: > > I've drafted a patch which I think improves things, but it probably > needs more work and opinions. > > Seems we can improve things by simply removing the "rule of thumb" sentence altogether. The prior paragraph states the things the

Re: constant crashing

2024-04-14 Thread David G. Johnston
On Sun, Apr 14, 2024 at 10:20 AM Francisco Olarte wrote: > > If postgres does not supress redundant updates ( lots of people can > answer that ) It does not. My other usual piece of advice along these lines, if doing the transform outside the database is not desirable, is to at least ensure

Re: In MacOS, psql reacts on SIGINT in a strange fashion (Linux is fine)

2024-04-13 Thread David G. Johnston
On Saturday, April 13, 2024, Dmitry Koterov wrote: > > > % psql --version > psql (PostgreSQL) 16.0 > How did you install this and can you install other, supported, versions? David J.

Re: three small improvements for "Composite Types" page

2024-04-12 Thread David G. Johnston
On Fri, Apr 12, 2024 at 1:20 PM Anton Voloshin wrote: > Hello, > > While reading "Composite Types" manual page I've noticed that it is > somewhat hard to follow by trying out given examples. I suggest three > small changes which would make this page a little easier to follow for > me: > > 1.

Re: Mysteries of the future

2024-04-11 Thread David G. Johnston
On Thu, Apr 11, 2024 at 7:20 AM Tom Lane wrote: > PG Doc comments form writes: > > SELECT to_date('2-1131', '-MMDD'); > > ERROR: 22008: date/time field value out of range: "2-1131" > > What exactly do you find wrong with that? November doesn't have > 31 days. > > Sure, we could

Re: 8.14.5 jsonb subscripting

2024-04-09 Thread David G. Johnston
On Tuesday, April 9, 2024, Arne Sommerfelt wrote: > Thank you! When googling it is easy to end up with latest docs, > unfortunately > The 12 is a hyperlink so it is almost just as easy to view the current page in the prior version. David J.

Re: What is referential_action?

2024-04-08 Thread David G. Johnston
On Monday, April 8, 2024, Ron Johnson wrote: > Four times, the word "referential_action" is used on this page, but it's > never mentioned what the possible referential actions are. > > Am I missing something? > > https://www.postgresql.org/docs/14/sql-altertable.html > Much of the details

Re: Clarification on View Privileges and Operator Execution in PostgreSQL

2024-04-07 Thread David G. Johnston
On Sun, Apr 7, 2024 at 11:02 AM Ayush Vatsa wrote: > > If you want to confirm what the documentation says create a custom > operator/function that alex is not permitted to execute and have them query > a view defined by postgres that uses that function. > Thanks for the suggestion, it helped and

Re: Clarification on View Privileges and Operator Execution in PostgreSQL

2024-04-07 Thread David G. Johnston
On Sun, Apr 7, 2024 at 9:32 AM Ayush Vatsa wrote: > but who will execute the > > underlying function inside the ( > ) operator ? Is it postgres or alex? > >> I'm reasonably confident that all the built-in functions are security invoker. Not that a pure function like greater-than really cares.

Re: Clarification on View Privileges and Operator Execution in PostgreSQL

2024-04-07 Thread David G. Johnston
On Sun, Apr 7, 2024 at 9:32 AM Ayush Vatsa wrote: > > Functions in the view are executed with the privileges of the user > executing the query or the function owner > So does that imply to the function associated with the operators (both > builtin and user defined) too. > Basically wanted to

Re: Clarification on View Privileges and Operator Execution in PostgreSQL

2024-04-07 Thread David G. Johnston
On Sun, Apr 7, 2024 at 9:10 AM Ayush Vatsa wrote: > > but what about the view which contains inbuilt operators or inbuilt > functions with whose privileges those will be executed. Eg. > >From the create view documentation: Functions called in the view are treated the same as if they had been

Re: A typo?

2024-04-07 Thread David G. Johnston
On Sun, Apr 7, 2024 at 7:24 AM jian he wrote: > On Sun, Apr 7, 2024 at 6:30 PM PG Doc comments form > wrote: > > > > The following documentation comment has been logged on the website: > > > > Page: https://www.postgresql.org/docs/16/plpgsql-declarations.html > > Description: > > > > Under

Re: Query regarding functions of postgres

2024-04-07 Thread David G. Johnston
On Sunday, April 7, 2024, Ayush Vatsa wrote: > > Whether the below two functions can be marked immutable or not > 1. If a function has constant Raise notice inside it. Eg. > Seems legit. > > 2. If a function has Raise notice but extracting current user inside notice, > although its output

Re: A typo?

2024-04-07 Thread David G. Johnston
On Saturday, April 6, 2024, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/plpgsql-declarations.html > Description: > > Under 43.3.1, "Notice that we omitted RETURNS real — we could have included >

Role Graph for PostgreSQL (v16+) v1-Beta

2024-04-05 Thread David G. Johnston
Hey All, Last year with the revisions to CREATEROLE I decided that having a view that allowed one to more readily see the membership graph of their cluster would be useful. I originally tried to write something up for psql but decided that was impractical given its requirements. Therefore, I

Re: documentation structure

2024-04-05 Thread David G. Johnston
On Fri, Apr 5, 2024 at 9:18 AM Robert Haas wrote: > On Fri, Apr 5, 2024 at 12:15 PM David G. Johnston > wrote: > > Here is a link to my attempt at this a couple of years ago. It > basically "abuses" refentry. > > > > > https://www.postgresql.org/m

Re: documentation structure

2024-04-05 Thread David G. Johnston
On Fri, Apr 5, 2024 at 9:01 AM Robert Haas wrote: > > > The rendering can be adjusted to some degree, but then we also need to > > make sure any new chunking makes sense in other chapters. (And it might > > also change a bunch of externally known HTML links.) > > I looked into this and I'm

Re: Reports on obsolete Postgres versions

2024-04-04 Thread David G. Johnston
On Thu, Apr 4, 2024 at 11:23 AM Bruce Momjian wrote: > On Wed, Apr 3, 2024 at 06:01:41PM -0700, David G. Johnston wrote: > > > > The PostgreSQL Global Development Group supports a major version for 5 > years > > -after its initial release. After its five year annive

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

2024-04-03 Thread David G. Johnston
On Thu, Mar 28, 2024 at 8:02 PM Erik Wienhold wrote: > Thanks, that sounds better. I incorporated that with some minor edits > in the attached v3. > Looks good. You added my missing ( but dropped the comma after "i.e." diff --git a/doc/src/sgml/ref/create_table.sgml

Re: CREATE ROLE inheritance details

2024-04-03 Thread David G. Johnston
On Sat, Mar 30, 2024 at 11:16 PM Noah Misch wrote: > On Tue, Jan 30, 2024 at 01:49:42PM -0700, David G. Johnston wrote: > > + The membership grants created by the > > + IN ROLE, ROLE, and > ADMIN > > + clauses have the role executing this command as the grant

Re: Reports on obsolete Postgres versions

2024-04-03 Thread David G. Johnston
On Tue, Apr 2, 2024 at 1:47 PM Bruce Momjian wrote: > On Tue, Apr 2, 2024 at 11:34:46AM +0200, Magnus Hagander wrote: > > Okay, I changed "superseded" to "old", and changed "latest" to > "current", patch attached. > > I took a pass at this and found a few items of note. Changes on top of

Re: How to reference a DB with a period in its name ?

2024-03-29 Thread David G. Johnston
On Fri, Mar 29, 2024 at 2:20 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Fri, Mar 29, 2024 at 2:16 PM David Gauthier > wrote: > >> I tried encapsulating the DB name in double quotes (no good) >> > > This is what the documentation says you

Re: How to reference a DB with a period in its name ?

2024-03-29 Thread David G. Johnston
On Fri, Mar 29, 2024 at 2:16 PM David Gauthier wrote: > I tried encapsulating the DB name in double quotes (no good) > This is what the documentation says you are supposed to do for non-simple identifiers so you need to show your work to understand where you went wrong. David J.

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

2024-03-28 Thread David G. Johnston
On Thu, Mar 7, 2024 at 9:29 PM Erik Wienhold wrote: > I wrote: > > The attached v2 is a simpler patch that instead modifies the existing > > error message. > > Forgot to attach v2. > > For consideration for the doc portion. The existing wording is too imprecise for my liking and just tacking on

Re: Problems caused by type resolution for the unknown type

2024-03-28 Thread David G. Johnston
On Thursday, March 28, 2024, wrote: > > > I've identified a number of cases that suffer from problems caused by the > type > resolution algorithm when the "unknown" type is present. > This has been brought up many times before, though not for a long while now. I’d suggest searching the mailing

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread David G. Johnston
On Wed, Mar 27, 2024 at 5:43 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > > This section is also the main entry point for users into the configuration > subsystem and hasn't been updated to reflect this new feature. That seems > like an oversight that nee

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread David G. Johnston
On Wed, Mar 27, 2024 at 5:17 PM Bruce Momjian wrote: > On Thu, Mar 28, 2024 at 12:43:29AM +0100, Jelte Fennema-Nio wrote: > > + xreflabel="allow_alter_system"> > > + allow_alter_system (boolean) > > + > > + allow_alter_system configuration > parameter > > + > > +

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread David G. Johnston
On Wed, Mar 27, 2024 at 3:18 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Mar 27, 2024 at 3:13 PM Bruce Momjian wrote: > >> On Wed, Mar 27, 2024 at 06:09:02PM -0400, Bruce Momjian wrote: >> > On Wed, Mar 27, 2024 at 11:05:55AM -0400, Robert Haa

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread David G. Johnston
On Wed, Mar 27, 2024 at 3:13 PM Bruce Momjian wrote: > On Wed, Mar 27, 2024 at 06:09:02PM -0400, Bruce Momjian wrote: > > On Wed, Mar 27, 2024 at 11:05:55AM -0400, Robert Haas wrote: > > > On Wed, Mar 27, 2024 at 10:43 AM Jelte Fennema-Nio > wrote: > > > > Alright, changed the GUC name to

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread David G. Johnston
On Wed, Mar 27, 2024 at 10:12 AM Isaac Morland wrote: > On Wed, 27 Mar 2024 at 13:05, Greg Sabino Mullane > wrote: > >> The purpose of the setting is to prevent accidental >>> modifications via ALTER SYSTEM in environments where >> >> >> The emphasis on 'accidental' seems a bit heavy here, and

Re: User roles for gathering performance metrics data

2024-03-26 Thread David G. Johnston
On Tuesday, March 26, 2024, Siraj G wrote: > > > I am from Oracle background. In Oracle, we grant select_catalog_role or > select any dictionary role to users who want to study performance data. I > am trying to get similar information on the roles or privileges in PgSQL > that we might want to

Re: Is this a buggy behavior?

2024-03-24 Thread David G. Johnston
On Sun, Mar 24, 2024 at 11:14 AM Peter J. Holzer wrote: > > It doesn't. Your statement > > > CREATE TABLE test1 > > ( > > c1 numeric NULL , > > c2 varchar(36) NOT NULL , > > CONSTRAINT test1_PK PRIMARY KEY (c1,c2) > > ) ; > > creates the table with both columns being defined as NOT NULL: > >

Re: Extension for PostgreSQL WIP

2024-03-24 Thread David G. Johnston
On Sun, Mar 24, 2024 at 5:49 AM ShadowGhost wrote: > Cast_jsonb_to_hstore WIP > v1 > This extension add function that can cast jsonb to hstore. > That link to my github where does my extension lie > https://github.com/antuanviolin/cast_jsonb_to_hstore > If you are intending to submit this to

Re: Seq scan vs index scan

2024-03-22 Thread David G. Johnston
On Fri, Mar 22, 2024 at 8:55 PM arun chirappurath wrote: > > I am trying to force query to use indexes using query hints. > > Set enable indexscan to ON, > Same for bitmap and index only scan > Everything is on by default in the planner. You need to think in terms of what you don't want to

Re: documentation structure

2024-03-22 Thread David G. Johnston
On Fri, Mar 22, 2024 at 11:19 AM Robert Haas wrote: > On Fri, Mar 22, 2024 at 1:35 PM Bruce Momjian wrote: > > But that all seems like a separate question from why we have the > statistic collector views in a completely different part of the > documentation from the rest of the system views. My

Re: documentation structure

2024-03-22 Thread David G. Johnston
On Fri, Mar 22, 2024, 09:32 Robert Haas wrote: > > > I notice that you say that the "Installation" section should "cover > the architectural overview and point people to where they can find the > stuff they need to install PostgreSQL in the various ways available to > them" so maybe you're not

Re: documentation structure

2024-03-22 Thread David G. Johnston
On Fri, Mar 22, 2024 at 7:10 AM Robert Haas wrote: > > That's actually what we had in chapter > 18, "Installation from Source Code on Windows", since removed. But for > some reason we decided that on non-Windows platforms, it needed a > whole new chapter rather than an extra sentence in the

  1   2   3   4   5   6   7   8   9   10   >