Re: Error-safe user functions

2022-12-07 Thread David G. Johnston
On Wed, Dec 7, 2022 at 8:04 AM Andrew Dunstan wrote: > > On 2022-12-07 We 09:20, Tom Lane wrote: > > Andrew Dunstan writes: > >> Perhaps we should add a type in the regress library that will never have > >> a safe input function, so we can test that the mechanism works as > >> expected in that c

Re: Error-safe user functions

2022-12-07 Thread David G. Johnston
On Wed, Dec 7, 2022 at 8:23 AM Tom Lane wrote: > Andrew Dunstan writes: > > On 2022-12-07 We 09:20, Tom Lane wrote: > >> Returning to the naming quagmire -- it occurred to me just now that > >> it might be helpful to call this style of error reporting "soft" > >> errors rather than "safe" errors

Re: Error-safe user functions

2022-12-07 Thread David G. Johnston
On Wed, Dec 7, 2022 at 9:06 AM Tom Lane wrote: > "David G. Johnston" writes: > > Why not do away with two separate functions and define a composite type > > (boolean, text) for is_valid to return? > > I don't see any advantage to that. It would be harder to

Re: [DOCS] Stats views and functions not in order?

2022-12-07 Thread David G. Johnston
On Tue, Dec 6, 2022 at 7:57 PM David G. Johnston wrote: > On Tue, Dec 6, 2022 at 6:36 PM Peter Smith wrote: > >> I'd like to "fix" this but IIUC there is no consensus yet about what >> order is best for patch 0001, right? >> >> > I'm plan

Re: Error-safe user functions

2022-12-07 Thread David G. Johnston
On Wed, Dec 7, 2022 at 9:59 AM Tom Lane wrote: > "David G. Johnston" writes: > > > Are you suggesting we should not go down the path that v8-0003 does in > the > > monitoring section cleanup thread? I find the usability of Chapter 54 > > System Views to be

Re: Error-safe user functions

2022-12-07 Thread David G. Johnston
On Wed, Dec 7, 2022 at 10:34 AM Andres Freund wrote: > > +{ oid => '8053', > > + descr => 'get error message if string is not valid input for data > type', > > + proname => 'pg_input_invalid_message', provolatile => 's', > > + prorettype => 'text', proargtypes => 'text regtype int4', > > + pr

Re: ANY_VALUE aggregate

2022-12-07 Thread David G. Johnston
On Wed, Dec 7, 2022 at 10:00 PM Vik Fearing wrote: > On 12/7/22 04:22, David G. Johnston wrote: > > On Mon, Dec 5, 2022 at 10:40 PM Vik Fearing > wrote: > > > >> On 12/6/22 05:57, David G. Johnston wrote: > >>> On Mon, Dec 5, 2022 at 9:48 PM Vik Fearing

Re: [PATCH] random_normal function

2022-12-08 Thread David G. Johnston
On Thu, Dec 8, 2022 at 2:53 PM Paul Ramsey wrote: > > random_normal(stddev float8 DEFAULT 1.0, mean float8 DEFAULT 0.0) > Any particular justification for placing stddev before mean? A brief survey seems to indicate other libraries, as well as (at least for me) learned convention, has the mean

Re: feature request ctid cast / sql exception

2021-04-17 Thread David G. Johnston
On Sat, Apr 17, 2021 at 10:58 AM Vladimír Houba ml. wrote: > I propose to implement a builtin and efficient bidirectional cast between > ctid and bigint types. > > Why? > Another nice feature would be a function that can be called from a sql > statement and would throw an exception when execut

Re: feature request ctid cast / sql exception

2021-04-17 Thread David G. Johnston
On Sat, Apr 17, 2021 at 12:58 PM Vladimír Houba ml. wrote: > I use ctid as a row identifier within a transaction in a Java application. > This doesn't present a very compelling argument since an actual user declared primary key is what is expected to be used as a row identifier. And as those are

Re: feature request ctid cast / sql exception

2021-04-17 Thread David G. Johnston
On Saturday, April 17, 2021, Tom Lane wrote: > "David G. Johnston" writes: > > On Sat, Apr 17, 2021 at 10:58 AM Vladimír Houba ml. > > wrote: > >> Another nice feature would be a function that can be called from a sql > >> statement and would

Re: 2 questions about volatile attribute of pg_proc.

2021-04-18 Thread David G. Johnston
On Sun, Apr 18, 2021 at 9:08 AM Tom Lane wrote: > Isaac Morland writes: > > On Sun, 18 Apr 2021 at 11:36, Tom Lane wrote: > >> Are you familiar with the halting problem? I don't see any meaningful > >> difference here. > > > I think what is being suggested is akin to type checking, not solving

Re: COPY table_name (single_column) FROM 'unknown.txt' DELIMITER E'\n'

2021-05-05 Thread David G. Johnston
On Wed, May 5, 2021 at 8:31 AM Joel Jacobson wrote: > Could it be an idea to exploit the fact that DELIMITER E'\n' is currently > an error? > > Why not just allow: "DELIMITER NONE" to be valid syntax meaning exactly what it says and does exactly what you desire? David J.

Re: COPY table_name (single_column) FROM 'unknown.txt' DELIMITER E'\n'

2021-05-05 Thread David G. Johnston
On Wed, May 5, 2021 at 10:34 AM Isaac Morland wrote: > On Wed, 5 May 2021 at 13:23, Chapman Flack wrote: > >> On 05/05/21 13:02, David G. Johnston wrote: >> > Why not just allow: "DELIMITER NONE" to be valid syntax meaning exactly >> > what it says and

Re: CALL versus procedures with output-only arguments

2021-05-31 Thread David G. Johnston
On Monday, May 31, 2021, Laurenz Albe wrote: > On Mon, 2021-05-31 at 15:55 -0400, Tom Lane wrote: > > > If I have two procedures > > > p1(IN int, IN int, OUT int, OUT int) > > > p1(OUT int, OUT int) > > > then a DROP, or ALTER, or GRANT, etc. on p1(int, int) should operate > on > > > the second o

v16 GRANT role TO role needs a multi-option setting capability

2023-01-23 Thread David G. Johnston
Hey, GRANT role_name [, ...] TO role_specification [, ...] [ WITH { ADMIN | INHERIT | SET } { OPTION | TRUE | FALSE } ] [ GRANTED BY role_specification ] It would be really nice to complete this new feature of INHERIT/SET FALSE/TRUE with a multi-specification capability. GRANT role_name

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

2023-01-24 Thread David G. Johnston
On Mon, Jan 9, 2023 at 9:09 AM Pavel Luzanov wrote: > When you include one role in another, you can specify three options: > ADMIN, INHERIT (added in e3ce2de0) and SET (3d14e171). > > For example. > > CREATE ROLE alice LOGIN; > > GRANT pg_read_all_settings TO alice WITH ADMIN TRUE, INHERIT TRUE,

Re: Making Vars outer-join aware

2023-01-24 Thread David G. Johnston
On Tue, Jan 24, 2023 at 12:31 PM Tom Lane wrote: > I wrote: > > Hans Buschmann writes: > >> I just noticed your new efforts in this area. > >> I wanted to recurr to my old thread [1] considering constant > propagation of quals. > >> [1] > https://www.postgresql.org/message-id/1571413123735.26...

Re: Making Vars outer-join aware

2023-01-24 Thread David G. Johnston
On Tue, Jan 24, 2023 at 1:25 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Tue, Jan 24, 2023 at 12:31 PM Tom Lane wrote: > >> select ... from t1 left join t2 on (t1.x = t2.y and t1.x = 1); > >> > >> If we turn the generic equivclass.c log

Re: CREATE ROLE bug?

2023-01-25 Thread David G. Johnston
On Wed, Jan 25, 2023 at 7:35 AM Bruce Momjian wrote: > > So, how would someone with CREATEROLE permission add people to their own > role, without superuser permission? Are we adding any security by > preventing this? > > As an encouraged design choice you wouldn't. You'd create a new group and

Re: Set arbitrary GUC options during initdb

2023-01-27 Thread David G. Johnston
On Fri, Jan 27, 2023 at 8:53 AM Tom Lane wrote: > Robert Haas writes: > > The idea is that instead of: > > > replace_token(conflines, "#max_connections = 100", repltok); > > > You'd write something like: > > > replace_guc_value(conflines, "max_connections", repltok); > > > Which would look for a

Re: pg_dump versus hash partitioning

2023-02-01 Thread David G. Johnston
On Wed, Feb 1, 2023 at 3:38 PM Tom Lane wrote: > Peter Geoghegan writes: > > You mentioned "minor releases" here. Who said anything about that? > > I did: I'd like to back-patch the fix if possible. I think changing > the default --load-via-partition-root choice could be back-patchable. > > If

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

2023-02-10 Thread David G. Johnston
On Fri, Feb 10, 2023 at 2:08 PM David Zhang wrote: > > I noticed the document psql-ref.sgml has been updated for both `du+` and > `dg+`, but only `du` and `\du+` are covered in regression test. Is that > because `dg+` is treated exactly the same as `du+` from testing point of > view? > Yes. > >

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

2023-02-15 Thread David G. Johnston
On Wed, Feb 15, 2023 at 2:31 PM David Zhang wrote: > There is a default built-in role `pg_monitor` and the behavior changed > after the patch. If `\dg+` and `\du+` is treated as the same, and `make > check` all pass, then I assume there is no test case to verify the output > of `duS+`. My point i

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

2023-02-17 Thread David G. Johnston
On Fri, Feb 17, 2023 at 4:02 AM Pavel Luzanov wrote: >List of roles > Role name | Attributes | > Member of > > ---++--- > admin | C

Re: Improving inferred query column names

2023-02-20 Thread David G. Johnston
On Mon, Feb 20, 2023 at 8:08 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 11.02.23 20:24, Andres Freund wrote: > > > > I think on a green field it'd be clearly better to do something like the > > above. What does give me pause is that it seems quite likely to break > > exi

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

2023-02-21 Thread David G. Johnston
On Tue, Feb 21, 2023 at 2:14 PM Pavel Luzanov wrote: > On 17.02.2023 19:53, David G. Johnston wrote: > > On Fri, Feb 17, 2023 at 4:02 AM Pavel Luzanov > wrote: > >>List of roles >> Role name |

Re: use has_privs_of_role() for pg_hba.conf

2022-10-08 Thread David G. Johnston
On Sat, Oct 8, 2022 at 8:47 AM Robert Haas wrote: > On Sat, Oct 8, 2022 at 11:14 AM Tom Lane wrote: > > Joe Conway writes: > > > Thanks -- looks good to me. If there are no other comments or concerns, > > > I will commit/push by the end of the weekend. > > > > Robert seems to think that this pa

Re: Question about "compound" queries.

2022-10-24 Thread David G. Johnston
On Mon, Oct 24, 2022 at 3:02 PM Anton A. Melnikov wrote: > Hello! > > Please, could somebody explain what the "compound" queries were created > for? > Maybe i'm calling them wrong. It's about queries like: > SELECT 1 + 2 \; SELECT 2.0 AS "float" \; SELECT 1; > > Such queries can neither be prepa

Re: confused with name in the pic

2022-10-26 Thread David G. Johnston
On Wed, Oct 26, 2022 at 2:13 AM jack...@gmail.com wrote: > typedef struct A_Expr > > > > { > > > > pg_node_attr(custom_read_write) > > > > NodeTag type; > > > > A_Expr_Kind kind; /* see above */ > > > > List *name; /* possibly-qualified name of operat

Re: doc: Fix description of how the default user name is chosen

2022-11-01 Thread David G. Johnston
he right thing. +user name. David J. On Mon, Oct 31, 2022 at 6:41 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 09.07.22 17:52, David G. Johnston wrote: > > No. It is always the user parameter. It just so happens that parameter >

Glossary and initdb definition work for "superuser" and database/cluster

2022-11-01 Thread David G. Johnston
Hey, Recent threads have pointed out some long-standing doc language in initdb that could be made more precise, especially in light of the relatively recent addition of a glossary. Toward this end I'm attaching a patch that defines three terms: "bootstrap superuser", "database superuser" and "sup

Re: Glossary and initdb definition work for "superuser" and database/cluster

2022-11-01 Thread David G. Johnston
On Tue, Nov 1, 2022 at 5:20 PM Justin Pryzby wrote: > On Tue, Nov 01, 2022 at 03:47:15PM -0700, David G. Johnston wrote: > > > I think this is wrong: > > | https://www.postgresql.org/docs/devel/app-initdb.html > | -U username > | --username=username > | > |

Re: Glossary and initdb definition work for "superuser" and database/cluster

2022-11-02 Thread David G. Johnston
On Tue, Nov 1, 2022 at 6:59 PM David G. Johnston wrote: > > P.S. I'm now looking at the very first paragraph to initdb more closely, > not liking "single server instance" all that much and wondering how to fit > in "cluster user" there - possibly by say

Re: DELETE CASCADE

2021-06-03 Thread David G. Johnston
On Thu, Jun 3, 2021 at 1:49 PM David Christensen < david.christen...@crunchydata.com> wrote: > Presented for discussion is a POC for a DELETE CASCADE functionality, > which will allow you one-shot usage of treating existing NO ACTION and > RESTRICT FK constraints as if they were originally defined

Re: DELETE CASCADE

2021-06-03 Thread David G. Johnston
On Thu, Jun 3, 2021 at 3:29 PM Isaac Morland wrote: > Surely you mean if we don't have DELETE permission on the referencing > table? I don't see why we need to be a member of the table owner role. > I would reverse the question - why does this feature need to allow the more broad DELETE permissi

Re: security_definer_search_path GUC

2021-06-07 Thread David G. Johnston
On Fri, Jun 4, 2021 at 9:03 AM Pavel Stehule wrote: > pá 4. 6. 2021 v 17:43 odesílatel Joel Jacobson napsal: > >> Maybe this could work: >> CREATE SCHEMA schema_name UNQUALIFIED; >> Which would explicitly make all the objects created in the schema >> accessible unqualified, but also enforce ther

Re: security_definer_search_path GUC

2021-06-07 Thread David G. Johnston
On Mon, Jun 7, 2021 at 2:09 PM David G. Johnston wrote: > On Fri, Jun 4, 2021 at 9:03 AM Pavel Stehule > wrote: > >> pá 4. 6. 2021 v 17:43 odesílatel Joel Jacobson >> napsal: >> >>> Maybe this could work: >>> CREATE SCHEMA schema_name UNQUALI

Re: security_definer_search_path GUC

2021-06-07 Thread David G. Johnston
On Mon, Jun 7, 2021 at 1:55 PM Joel Jacobson wrote: > If we don't like "UNQUALIFIED" as a keyword, maybe we could reuse "PUBLIC"? > Or will that be confusing since "PUBLIC" is also a role_specification? > > For me the concept resembles explicitly denoting certain schemas as being simple tags, whi

Re: A modest proposal vis hierarchical queries: MINUS in the column list

2021-06-07 Thread David G. Johnston
On Mon, Jun 7, 2021 at 1:54 PM Mark Zellers wrote: > Failing that, I have a modest suggestion that I would like to start a > discussion around. What if you could use the MINUS keyword in the column > list of a select statement to remove a column from the result set returned > to the client? > I

Re: DELETE CASCADE

2021-06-09 Thread David G. Johnston
On Wednesday, June 9, 2021, Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > > It might work, I'm just saying it needs to be thought about carefully. If > you have functionality like, delete this if there is no matching record > over there, you need to have the permission to check th

Re: enable_resultcache confusion

2021-07-08 Thread David G. Johnston
On Thu, Jul 8, 2021 at 10:29 AM Robert Haas wrote: > On Thu, Jul 8, 2021 at 12:51 PM Bruce Momjian wrote: > > Are we going to be forever explaining that enable_resultcache doesn't > > cache query results? > > Yes, I can see that causing ongoing confusion. Naming things is really > hard... > > I

Re: enable_resultcache confusion

2021-07-08 Thread David G. Johnston
On Thu, Jul 8, 2021 at 11:00 AM Tom Lane wrote: > Maybe name the plan node type Memoize, and the GUC "enable_memoize"? > > +1 David J.

Re: Re: fix cost subqueryscan wrong parallel cost

2022-04-28 Thread David G. Johnston
On Thu, Apr 28, 2022 at 9:53 AM Robert Haas wrote: > On Fri, Apr 22, 2022 at 11:55 AM David G. Johnston > wrote: > > On Wed, Apr 20, 2022 at 11:38 PM bu...@sohu.com wrote: > >> > >> > > for now fuction cost_subqueryscan always using *total* rows even

Re: Assorted small doc patches

2022-04-29 Thread David G. Johnston
Updated status of the set. On Wed, Apr 20, 2022 at 5:59 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > > v0001-database-default-name (-bugs, with a related cleanup suggestion as > well) > > https://www.postgresql.org/message-id/flat/CAKFQuwZvHH1HVSOu

Re: fix cost subqueryscan wrong parallel cost

2022-04-29 Thread David G. Johnston
On Fri, Apr 29, 2022 at 7:02 AM Tom Lane wrote: > Richard Guo writes: > > Currently subquery scan is using rel->rows (if no parameterization), > > which I believe is not correct. That's not the size the subquery scan > > node in each worker needs to handle, as the rows have been divided > > acro

Re: fix cost subqueryscan wrong parallel cost

2022-04-29 Thread David G. Johnston
On Fri, Apr 29, 2022 at 11:09 AM Tom Lane wrote: > > In short, these SubqueryScans are being labeled as producing 6 rows > when their input only produces 25000 rows, which is surely insane. > > So: even though the SubqueryScan itself isn't parallel-aware, the number > of rows it processes has

Re: fix cost subqueryscan wrong parallel cost

2022-04-29 Thread David G. Johnston
On Fri, Apr 29, 2022 at 12:31 PM Tom Lane wrote: > "David G. Johnston" writes: > > The fact that (baserel.rows > path->subpath->rows) here seems like a > > straight bug: there are no filters involved in this case but in the > > presence of filters baser

Re: ERROR: type of parameter 1 (fruit2) does not match that when preparing the plan (fruit1)

2022-05-01 Thread David G. Johnston
Moving discussion to -hackers On Sun, May 1, 2022 at 12:46 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Sun, May 1, 2022 at 10:08 AM Tom Lane wrote: > >> Maybe we could improve this situation by treating a "record" parameter > >> a

Re: strange slow query - lost lot of time somewhere

2022-05-02 Thread David G. Johnston
On Mon, May 2, 2022 at 4:02 PM Tom Lane wrote: > David Rowley writes: > > On Mon, 2 May 2022 at 21:00, Pavel Stehule > wrote: > >> I found a query that is significantly slower with more memory > > > If it was work_mem you increased, it seems strange that the plan would > > switch over to using

Re: strange slow query - lost lot of time somewhere

2022-05-02 Thread David G. Johnston
On Mon, May 2, 2022 at 7:13 PM David Rowley wrote: > On Tue, 3 May 2022 at 11:02, Tom Lane wrote: > > > > David Rowley writes: > > > On Mon, 2 May 2022 at 21:00, Pavel Stehule > wrote: > > >> I found a query that is significantly slower with more memory > > > > > If it was work_mem you increas

Re: strange slow query - lost lot of time somewhere

2022-05-02 Thread David G. Johnston
On Mon, May 2, 2022 at 7:30 PM David Rowley wrote: > On Tue, 3 May 2022 at 13:43, David G. Johnston > wrote: > > hit_ratio = (est_entries / ndistinct) - (ndistinct / calls) || clamp to > 0.0 > > I don't understand the adjustment factor ndistinct/calls > > I'

Re: SQL/JSON: FOR ORDINALITY bug

2022-05-03 Thread David G. Johnston
On Tue, May 3, 2022 at 5:27 PM Andrew Dunstan wrote: > > On 2022-05-03 Tu 11:19, Erik Rijkers wrote: > > Hi > > > > I've copied some statements from the .pdf called: > > "TECHNICAL REPORT ISO/IEC TR 19075-6 First edition 2017-03 > > Part SQL Notation support 6: (JSON) for JavaScript Object" > >

JSON Functions and Operators Docs for v15

2022-05-04 Thread David G. Johnston
Hey, Is there a thread I'm not finding where the upcoming JSON function documentation is being made reasonably usable after doubling its size with all the new JSON Table features that we've added? If nothing else, the table of contents at the top of the page needs to be greatly expanded to make s

Re: JSON Functions and Operators Docs for v15

2022-05-04 Thread David G. Johnston
On Wed, May 4, 2022 at 8:39 AM Tom Lane wrote: > "David G. Johnston" writes: > > Is there a thread I'm not finding where the upcoming JSON function > > documentation is being made reasonably usable after doubling its size > with > > all the new JSON Table

Did we intend to change whether PUBLIC can create tables in the public schema by default?

2022-05-04 Thread David G. Johnston
Hey, For the following sequence of commands, on a newly initdb v15devel and mostly clean v13 I get a failure and a created table respectively. Showing v15devel: postgres=# create database testdb; CREATE DATABASE postgres=# create role testrole; CREATE ROLE postgres=# \c testdb You are now connec

Re: Did we intend to change whether PUBLIC can create tables in the public schema by default?

2022-05-04 Thread David G. Johnston
On Wed, May 4, 2022 at 12:42 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > Hey, > > For the following sequence of commands, on a newly initdb v15devel and > mostly clean v13 I get a failure and a created table respectively. > > Apparently I didn't sear

Re: SQL/JSON: FOR ORDINALITY bug

2022-05-04 Thread David G. Johnston
On Wed, May 4, 2022 at 1:09 PM Erik Rijkers wrote: > Op 04-05-2022 om 21:12 schreef Andrew Dunstan: > > > > I don't see how rowseq can be anything but 1. Each invocation of > >> > >> > >> After some further experimentation, I now think you must be right, > David. > >> > >> Also, lookin

Re: SQL/JSON: FOR ORDINALITY bug

2022-05-04 Thread David G. Johnston
On Wed, May 4, 2022 at 1:43 PM David G. Johnston wrote: > On Wed, May 4, 2022 at 1:09 PM Erik Rijkers wrote: > >> Op 04-05-2022 om 21:12 schreef Andrew Dunstan: >> > >> >>>> >> >>>> I don't see how rowseq can be anything b

Re: strange slow query - lost lot of time somewhere

2022-05-05 Thread David G. Johnston
On Mon, May 2, 2022 at 10:02 PM Pavel Stehule wrote: > > > út 3. 5. 2022 v 6:57 odesílatel Tom Lane napsal: > >> Pavel Stehule writes: >> > there is really something strange (see attached file). Looks so this >> issue >> > is much more related to planning time than execution time >> >> You sure

Re: Provide read-only access to system catalog tables

2022-05-17 Thread David G. Johnston
On Tuesday, May 17, 2022, Chirag Karkera wrote: > > > the user has to be provided the read only access on system catalog tables > (information_schema and pg_catalog) > All roles have this, no action required. David J.

Re: Provide read-only access to system catalog tables

2022-05-17 Thread David G. Johnston
On Tue, May 17, 2022 at 6:21 AM Chirag Karkera wrote: > Thanks David for your reply! > > But when i created a role i am not able to view objects under > information_schema.* > > I mean I am not able to view the data, I can see only the column names. > >> >> Which goes to demonstrate you have perm

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

2022-05-18 Thread David G. Johnston
On Wed, May 18, 2022 at 6:35 PM Shinya Kato wrote: > > Too bad there's no --comment parameter to do COMMENT ON ROLE name IS > > 'Comment'; > > > > As you already make such changes in createuser, I would like to ask > > for an additional --comment parameter > > that will allow sysadmins to set a c

Re: check for null value before looking up the hash function

2022-05-21 Thread David G. Johnston
On Sat, May 21, 2022 at 8:32 AM Ranier Vilela wrote: > Em sáb., 21 de mai. de 2022 às 12:05, Tomas Vondra < > tomas.von...@enterprisedb.com> escreveu: > >> >> >> On 5/21/22 15:06, Ranier Vilela wrote: >> >>Zhihong Yu writes: >> >>> I was looking at the code in hash_record() >> >>> of src/backend

Re: check for null value before looking up the hash function

2022-05-21 Thread David G. Johnston
On Sat, May 21, 2022 at 10:04 AM Ranier Vilela wrote: > Em sáb., 21 de mai. de 2022 às 13:13, Tom Lane > escreveu: > >> Ranier Vilela writes: >> > Em sáb., 21 de mai. de 2022 às 12:05, Tomas Vondra < >> > tomas.von...@enterprisedb.com> escreveu: >> >> That's a quite bold claim, and yet you have

Re: postgres_fdw has insufficient support for large object

2022-05-22 Thread David G. Johnston
On Sunday, May 22, 2022, Saladin wrote: > > The output i expected: > pg_largeobject_metadata and pg_largeobject in both database A and database > B should have rows.Shouldn't only in database A.So, i can use large object > functions > to operate large_objectin remote table or foreign table. > Th

Re: Invalid memory alloc request size for repeat()

2022-05-25 Thread David G. Johnston
On Wednesday, May 25, 2022, Japin Li wrote: > > Hi, > > Today, I try to use repeat() to generate 1GB text, and it occurs invalid > memory > alloc request size [1]. It is a limit from palloc(), then I try to reduce > it, > it still complains out of memory which comes from enlargeStringInfo() > [2

Re: postgres and initdb not working inside docker

2022-05-28 Thread David G. Johnston
On Sat, May 28, 2022 at 9:35 AM Roffild wrote: > Docker is now the DevOps standard. It's easier to build an image for > Docker and run the site with one command. > > But the volume mount has a limitation with chmod 755. I don't want to > write the database directly to the container. > > The conta

Re: Assorted small doc patches

2022-05-31 Thread David G. Johnston
#x27;t really dipped even with the couple of bad bugs being worked on. Thank you! David J. On Fri, Apr 29, 2022 at 6:52 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > Updated status of the set. > > On Wed, Apr 20, 2022 at 5:59 PM David G. Johnston < > david.g.joh

Re: Assorted small doc patches

2022-06-01 Thread David G. Johnston
On Wed, Jun 1, 2022 at 7:05 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 31.05.22 22:12, David G. Johnston wrote: > > Anything I should be doing differently here to get a bit of > > reviewer/committer time on these? I'll add them to the commit

Re: invoker function security issues

2022-06-08 Thread David G. Johnston
On Wed, Jun 8, 2022 at 7:29 AM Virender Singla wrote: > but I still expect Postgres to save us from such data inconsistencies > issues by using early binding for functional Indexes. > Well, if the functions you are writing are "black boxes" to PostgreSQL this expectation seems unreasonable. As

doc: Clarify Savepoint Behavior

2022-06-09 Thread David G. Johnston
Hi, Reposting this on its own thread. https://www.postgresql.org/message-id/flat/CAKFQuwby1aMsJDMeibaBaohgoaZhivAo4WcqHC1%3D9-GDZ3TSng%40mail.gmail.com Presently, the open item seems to be whether my novelty regarding the reworked example is too much. David J. 0001-doc-Clarify-Savepoint-behav

doc: Clarify what "excluded" represents for INSERT ON CONFLICT

2022-06-09 Thread David G. Johnston
Hi, Reposting this on its own thread. https://www.postgresql.org/message-id/flat/CAKFQuwby1aMsJDMeibaBaohgoaZhivAo4WcqHC1%3D9-GDZ3TSng%40mail.gmail.com As one cannot place excluded in a FROM clause (subquery) in the ON CONFLICT clause referring to it as a table, with plural rows none

Re: doc: Clarify Savepoint Behavior

2022-06-09 Thread David G. Johnston
On Thu, Jun 9, 2022 at 8:36 AM David G. Johnston wrote: > Hi, > > Reposting this on its own thread. > > > https://www.postgresql.org/message-id/flat/CAKFQuwby1aMsJDMeibaBaohgoaZhivAo4WcqHC1%3D9-GDZ3TSng%40mail.gmail.com > > Presently, the open item seems to be whether

doc: Clarify Routines and Extension Membership

2022-06-09 Thread David G. Johnston
Hi. Reposting this on its own thread. https://www.postgresql.org/message-id/flat/CAKFQuwby1aMsJDMeibaBaohgoaZhivAo4WcqHC1%3D9-GDZ3TSng%40mail.gmail.com Per discussion on -general the documentation for the ALTER ROUTINE ... DEPENDS ON EXTENSION and DROP EXTENSION doesn't clearly indic

doc: Fix description of how the default user name is chosen

2022-06-09 Thread David G. Johnston
Hi. Reposting this on its own thread. https://www.postgresql.org/message-id/flat/CAKFQuwby1aMsJDMeibaBaohgoaZhivAo4WcqHC1%3D9-GDZ3TSng%40mail.gmail.com The default database name is just the user name, not the operating-system user name. In passing, the authentication error examples

doc: Make selectivity example match wording

2022-06-09 Thread David G. Johnston
Hi, Reposting this to its own thread. https://www.postgresql.org/message-id/flat/CAKFQuwby1aMsJDMeibaBaohgoaZhivAo4WcqHC1%3D9-GDZ3TSng%40mail.gmail.com doc: make unique non-null join selectivity example match the prose The description of the computation for the unique, non-null, joi

doc: Move enum storage commentary to top of section

2022-06-09 Thread David G. Johnston
Per suggestion over on -docs: https://www.postgresql.org/message-id/bl0pr06mb4978f6c0b69f3f03aebed0fbb3...@bl0pr06mb4978.namprd06.prod.outlook.com David J. 0001-doc-Move-enum-storage-size-to-top-of-section.patch Description: Binary data

doc: Bring mention of unique index forced transaction wait behavior outside of the internal section

2022-06-09 Thread David G. Johnston
Hi. The fact that one transaction will wait on another if they are trying to claim the same unique value is presently relegated to a subchapter of the documentation where the typical reader will not even understand (rightly so) the main chapter's title. This has prompted a number of questions bei

doc: array_length produces null instead of 0

2022-06-09 Thread David G. Johnston
Hi, Per discussion here: https://www.postgresql.org/message-id/163636931138.8076.5140809232053731248%40wrigleys.postgresql.org We can now easily document the array_length behavior of returning null instead of zero for an empty array/dimension. I added an example to the json_array_length functio

Re: replacing role-level NOINHERIT with a grant-level option

2022-06-13 Thread David G. Johnston
On Mon, Jun 13, 2022 at 11:01 AM Robert Haas wrote: > Some > syntax would be a bit different on the new releases and that would > unlock some new options we don't currently have, but there's no > behavior that you can get today which you wouldn't be able to get any > more under this proposal. >

Re: Modest proposal to extend TableAM API for controlling cluster commands

2022-06-15 Thread David G. Johnston
On Wed, Jun 15, 2022 at 8:18 PM Andres Freund wrote: > > If a simple callback like > > relation_supports_cluster(Relation rel) is too simplistic > Seems like it should be called: relation_supports_compaction[_by_removal_of_interspersed_dead_tuples] Basically, if the user tells the table to make

Re: Extending USING [heap | mytam | yourtam] grammar and behavior

2022-06-15 Thread David G. Johnston
On Wed, Jun 15, 2022 at 8:51 PM Michael Paquier wrote: > On top of that > default_table_access_method is user-settable. > > FWIW this proposal acknowledges that and basically leverages it to the hilt, turning it into something like search_path. I strongly dislike the idea of any workflow that de

Re: Modest proposal to extend TableAM API for controlling cluster commands

2022-06-16 Thread David G. Johnston
On Wed, Jun 15, 2022 at 11:23 PM Mark Dilger wrote: > > > On Jun 15, 2022, at 8:50 PM, David G. Johnston < > david.g.johns...@gmail.com> wrote: > > > > On Wed, Jun 15, 2022 at 8:18 PM Andres Freund > wrote: > > > If a simple callback like > >

Re: Assorted small doc patches

2022-06-20 Thread David G. Johnston
On Wed, Jun 1, 2022 at 7:05 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 31.05.22 22:12, David G. Johnston wrote: > > Anything I should be doing differently here to get a bit of > > reviewer/committer time on these? I'll add them to the commit

Re: doc: array_length produces null instead of 0

2022-06-21 Thread David G. Johnston
On Tue, Jun 21, 2022 at 6:33 AM Aleksander Alekseev < aleksan...@timescale.com> wrote: > Hi David, > > > Per discussion here: > > > > > https://www.postgresql.org/message-id/163636931138.8076.5140809232053731248%40wrigleys.postgresql.org > > > > We can now easily document the array_length behavior

Re: doc: Bring mention of unique index forced transaction wait behavior outside of the internal section

2022-06-21 Thread David G. Johnston
On Tue, Jun 21, 2022 at 6:49 AM Aleksander Alekseev < aleksan...@timescale.com> wrote: > Hi David, > > > It's basically a glorified cross-reference. I didn't dislike directing > the reader to the internals section enough to try and establish a better > location for the main content. > > One probl

Re: SYSTEM_USER reserved word implementation

2022-06-22 Thread David G. Johnston
On Wed, Jun 22, 2022 at 9:28 AM Tom Lane wrote: > Joe Conway writes: > > On 6/22/22 11:52, Tom Lane wrote: > >> I think a case could be made for ONLY returning non-null when authn_id > >> represents some externally-verified identifier (OS user ID gotten via > >> peer identification, Kerberos pri

Re: explain analyze rows=%.0f

2022-06-22 Thread David G. Johnston
On Wed, Jun 22, 2022 at 12:11 PM Ibrar Ahmed wrote: > On Thu, Jun 23, 2022 at 12:01 AM Tom Lane wrote: > >> Robert Haas writes: >> > On Jun 2, 2009, at 9:41 AM, Simon Riggs wrote: >> >> You're right that the number of significant digits already exceeds the >> >> true accuracy of the computatio

Re: [PoC] Let libpq reject unexpected authentication requests

2022-06-22 Thread David G. Johnston
On Thu, Jun 9, 2022 at 4:30 PM Jacob Champion wrote: > On Wed, Jun 8, 2022 at 9:58 PM Michael Paquier > wrote: > > > One > > interesting case comes down to stuff like channel_binding=require > > require_auth="md5,scram-sha-256", where I think that we should still > > fail even if the server asks

Re: pg_auth_members.grantor is bunk

2022-06-24 Thread David G. Johnston
On Fri, Jun 24, 2022 at 1:19 PM Robert Haas wrote: > On Mon, Jun 6, 2022 at 7:41 PM Stephen Frost wrote: > > > > In terms of how that's then used, yeah, it's during REVOKE because a > > REVOKE is only able to 'find' role authorization descriptors which match > > the triple of role revoked, grant

Re: Hardening PostgreSQL via (optional) ban on local file system access

2022-06-24 Thread David G. Johnston
On Fri, Jun 24, 2022 at 3:08 PM Hannu Krosing wrote: > > 1) would it be enough to just disable WRITING to the filesystem (COPY > ... TO ..., COPY TO ... PROGRAM ...) or are some reading functions > also potentially exploitable or at least making attackers life easier > ? > I would protect read p

Re: Hardening PostgreSQL via (optional) ban on local file system access

2022-06-24 Thread David G. Johnston
On Fri, Jun 24, 2022 at 4:13 PM Andres Freund wrote: > Hi, > > On 2022-06-25 00:08:13 +0200, Hannu Krosing wrote: > > Currently the file system access is controlled via being a SUPREUSER > > or having the pg_read_server_files, pg_write_server_files and > > pg_execute_server_program roles. The pro

Re: Hardening PostgreSQL via (optional) ban on local file system access

2022-06-24 Thread David G. Johnston
On Friday, June 24, 2022, Gurjeet Singh wrote: > On Fri, Jun 24, 2022 at 4:13 PM Andres Freund wrote: > > On 2022-06-25 00:08:13 +0200, Hannu Krosing wrote: > > > > 3) should this be back-patched (we can provide batches for all > > > supported PgSQL versions) > > > > Err, what? > > Translation:

Re: doc: Clarify Savepoint Behavior

2022-06-26 Thread David G. Johnston
Thank you for the review. On Thu, Jun 23, 2022 at 5:35 AM Simon Riggs wrote: > On Thu, 9 Jun 2022 at 16:41, David G. Johnston > wrote: > > "The name to give to the new savepoint. The name may already exist, > + in which case a rollback or release to the sa

Re: Making the subquery alias optional in the FROM clause

2022-06-27 Thread David G. Johnston
On Mon, Jun 27, 2022 at 11:25 AM Dean Rasheed wrote: > On Mon, 27 Jun 2022 at 16:12, Julien Rouhaud wrote: > > > > It doesn't play that well if you have something called subquery though: > > > > [example that changes a user-provided alias] > > > > While the output is a valid query, it's not nice

Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT

2022-06-30 Thread David G. Johnston
On Thu, Jun 30, 2022 at 1:43 PM Robert Haas wrote: > On Thu, Jun 9, 2022 at 11:40 AM David G. Johnston > wrote: > > As one cannot place excluded in a FROM clause (subquery) in the > > ON CONFLICT clause referring to it as a table, ... > > Well, it would be ni

Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT

2022-06-30 Thread David G. Johnston
On Thu, Jun 30, 2022 at 2:31 PM Peter Geoghegan wrote: > On Thu, Jun 30, 2022 at 2:07 PM David G. Johnston > wrote: > > Current: > > "The SET and WHERE clauses in ON CONFLICT DO UPDATE have access to the > > existing row using the table's name (or an alia

Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT

2022-07-01 Thread David G. Johnston
On Fri, Jul 1, 2022 at 7:58 AM Peter Geoghegan wrote: > On Fri, Jul 1, 2022 at 6:01 AM Robert Haas wrote: > > What would probably help more is adding something like this to the > > error message: > > > > HINT: column "b" could refer to any of these relations: "foo", "excluded" > > > > That could

Re: doc: Fix description of how the default user name is chosen

2022-07-05 Thread David G. Johnston
On Tue, Jul 5, 2022 at 5:20 PM Tom Lane wrote: > "David G. Johnston" writes: > > In passing, the authentication error examples use the phrase > > "database user name" in a couple of locations. The word > > database in both

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