The example in
https://www.postgresql.org/docs/current/event-trigger-example.html
stopped compiling since commit 2f9661311b.
Here is a patch to fix that.
Yours,
Laurenz Albe
From ae0aa8d01df0626a0417c6c339f59ee50de5c2b3 Mon Sep 17 00:00:00 2001
From: Laurenz Albe
Date: Fri, 23 Dec 2022 13:07
Applied to all the relevant branches.
Thanks for the quick work!
Yours,
Laurenz Albe
6m02 ADD UNIQUE (city_id, logdate);
> ALTER INDEX measurement_city_id_logdate_key
> ATTACH PARTITION measurement_y2006m02_city_id_logdate_key;
> ...
> ```
> "
>
> I might be misinterpreting something. Sorry if that's the case!
r 0x41 in ASCII) repeated 10 times.
>
> SoThis does **not** disable 1-B header. That sentence should be removed
> from the documentation unless this is a bug.
I think that the documentation is wrong. The attached patch removes the
offending half-sentence.
Yours,
Laurenz Albe
On Sun, 2023-01-15 at 16:40 -0500, Tom Lane wrote:
> Laurenz Albe writes:
> > On Tue, 2023-01-10 at 15:53 +, PG Doc comments form wrote:
> > > > PLAIN prevents either compression or out-of-line storage; furthermore it
> > > > disables use of single-byte heade
On Mon, 2023-01-16 at 11:50 -0500, Tom Lane wrote:
> Laurenz Albe writes:
> > On Sun, 2023-01-15 at 16:40 -0500, Tom Lane wrote:
> > > The documentation is correct, what is broken is the code.
>
> > I see. But what is the reason for that anyway? Why not allow short v
(I don't know the comma rules)
> "because the files(,?) that are generated/processed by these tools(,?) are
> already included in the tarball"
+1
Correct English would be:
These tools are not needed to build from a distribution tarball, because
the files generated by these tools are included in the tarball.
Yours,
Laurenz Albe
On Wed, 2023-01-25 at 20:39 -0500, Tom Lane wrote:
> Laurenz Albe writes:
> > On Wed, 2023-01-25 at 08:22 +, PG Doc comments form wrote:
> > > Maybe this would be better? (I don't know the comma rules)
> > > "because the files(,?) that are gener
the wraparound isn’t really a problem with
> default isolation level but more for higher levels such as repeatable read
> and such.
>
> please correct me if my understanding is incorrect.
Wraparound can be a problem on all isolation levels. It has to do with
transaction IDs and visibility.
Yours,
Laurenz Albe
e should consider adding "unless the NULLS NOT DISTINCT clause is used when
> creating the index", or something to that effect.
+1
Here is a patch for that.
Yours,
Laurenz Albe
From b02fbf9e11c6953269428dd8572e79349d61d646 Mon Sep 17 00:00:00 2001
From: Laurenz Albe
Date: Thu, 16
mply be a problem accessing
the network?
Yours,
Laurenz Albe
opose to remove the mention of backslashes there.
Yours,
Laurenz Albe
From 282d2dae27524aef37cdafe02e4833894bf5892c Mon Sep 17 00:00:00 2001
From: Laurenz Albe
Date: Tue, 11 Apr 2023 09:48:20 +0200
Subject: [PATCH] Remove obsolete mention of backslashes as escapes
Since version 9.1, standard_conforming_st
he example that was before:
CREATE COLLATION "und-u-co-emoji-x-icu" (provider = icu, locale =
'@collation=emoji');
There is nothing, that is an ampty string, before the "@".
Yours,
Laurenz Albe
completely ANSI C and trimmed in size by 25%.
That uses "ANSI C" as an adjective, which I think is sloppy wording
(even though English is somewhat relaxed about the distinction between
classes of words).
How about: "... was written completely in ANSI C ..."
Yours,
Laurenz Albe
o places.
+1
"Cross product" seems to be a misbegotten hybrid of "cross join" and
"Cartesian product".
Since we are talking about Cartesian products: is the term "Cartesian join"
used anywhere?
Yours,
Laurenz Albe
would be {Cartesian product,Cartesian join,cross product,cross
join}.
Yours,
Laurenz Albe
ocumented anywhere.
One of PREPARE or the extended query protocol might be good places.
Yours,
Laurenz Albe
r" is not even mentioned in
https://www.postgresql.org/docs/current/datatype-character.html ,
so I think it is OK to consider it an internal thing that should not be used
by users directly. I think that there is no need to document that small
behavior difference.
Yours,
Laurenz Albe
n help with writing, if needed.
This is documented here:
https://www.postgresql.org/docs/current/lo.html
Admittedly, that is not the best place. Perhaps the introductory chapter
in https://www.postgresql.org/docs/current/lo-intro.html would be a good
place to mention that there is no referential int
On Tue, 2023-06-13 at 10:57 +, Oliver Marienfeld wrote:
> I would understand if you decided against extending the docs.
I don't get to decide that.
If you come up with a patch for the documentation, that would
increase the chances that the documentation actually gets changed.
Yours,
ce');
COMMIT;
you could end up with two rows with the same name, which could not
happen in a serial execution of the transactions.
Yours,
Laurenz Albe
in this case would be an output column. Perhaps we can mention
the alias explicitly.
Yours,
Laurenz Albe
ple to believe postgres is good, get its
> documentation is so poor.
The documentation is not half as bad as this unspecific problem report.
But I guess you are out to rant, not to get anything improved.
Yours,
Laurenz Albe
l
@@ -8505,6 +8505,14 @@ SELECT regexp_match('abc01234xyz',
'(?:(.*?)(\d+)(.*)){1,1}');
+
+
+ If the format provides for fewer fractional digits than the number being
+ formatted has, to_char() will round the number to
+ the specified number of fractional digits.
+
+
+
The pattern characters S, L,
D,
Yours,
Laurenz Albe
mmitfest. That increases the likelyhood of
you patch not being forgotten.
Yours,
Laurenz Albe
On Wed, 2023-09-06 at 16:53 -0400, Bruce Momjian wrote:
> I slightly modified your patch and applied it back to PG 11 since all
> supported Postgres versions have the same behavior. Thanks.
Thanks for picking it up.
Yours,
Laurenz Albe
On Fri, 2023-09-08 at 17:25 -0400, Bruce Momjian wrote:
> Thanks, patch applied back to PG 11.
Thank you!
Laurenz Albe
ding.html .
You can't expect us to enumerate every tool that is not suitable for
upgrading.
Yours,
Laurenz Albe
.
> - Whether CREATE INDEX CONCURRENTLY "returns" immediately or blocks the
> session until it's created?
It blocks until the index has been created.
Do you want to propose a patch?
Yours,
Laurenz Albe
On Fri, 2023-09-29 at 18:19 -0400, Bruce Momjian wrote:
> On Thu, Jan 12, 2023 at 03:43:57PM +0100, Laurenz Albe wrote:
> > On Tue, 2023-01-10 at 15:53 +, PG Doc comments form wrote:
> > > https://www.postgresql.org/docs/devel/storage-toast.html - This is the
> &g
the storag order is the order in which PostgreSQL stores
multiranges internally:
SELECT '{[100,200),[-100,-50),[-1,2)}'::int4multirange;
int4multirange
═══
{[-100,-50),[-1,2),[100,200)}
(1 row)
Yours,
Laurenz Albe
a good suggestion for an improvement, you could send it;
perhaps someone will pick it up.
Yours,
Laurenz Albe
erministic and can be relied on.
How about the attached patch, which does away with the confusing
mention of "storage order"?
Yours,
Laurenz Albe
From e39d1b5760d6fa0ed143c13589f717846cc82574 Mon Sep 17 00:00:00 2001
From: Laurenz Albe
Date: Thu, 5 Oct 2023 08:48:21 +0200
Subject: [P
ing. It has nothing to do with the
server parameter that was removed in 7.4.
Yours,
Laurenz Albe
"variables" in SQL (as proposed
in [1]) leads a lot of people to abuse placeholder parameters as variables
to hold application state. I am sure that that is where this complaint
comes from. We maintain that doing so is not a valid use case, but that claim
sounds increasingly like a grammari
On Mon, 2023-10-16 at 16:21 -0400, Tom Lane wrote:
> So maybe we should allow ALTER SYSTEM for unrecognized parameters,
> as long as the parameter name is syntactically legit and you're a
> superuser.
That seems more consistent than the current behavior, so +1.
Yours,
Laurenz Albe
ive_library"
That would be worse than the original. What is "this"?
I'd suggest "Another way to archive WAL ...".
Yours,
Laurenz Albe
On Wed, 2023-11-01 at 13:09 -0400, Bruce Momjian wrote:
> On Thu, Feb 18, 2021 at 08:16:13AM +0100, Laurenz Albe wrote:
> > On Wed, 2021-02-17 at 15:08 -0500, Jordi Gutiérrez Hermoso wrote:
> > > I just had a confusing moment trying to figure out why my roles
> > > were
On Wed, 2023-11-01 at 16:28 -0400, Bruce Momjian wrote:
> On Wed, Nov 18, 2020 at 05:28:44PM +0100, Laurenz Albe wrote:
> > On Wed, 2020-11-18 at 22:49 +0900, Fujii Masao wrote:
> > > On 2020/11/12 17:14, Laurenz Albe wrote:
> > > > On Wed, 2020-11-11 at 1
On Wed, 2023-11-01 at 18:03 -0400, Bruce Momjian wrote:
> On Wed, Nov 1, 2023 at 09:40:43PM +0100, Laurenz Albe wrote:
> > > Yes, I agree this documentation needs help.
> > >
> > > For upper/lower(), it is clear that the documentation is better saying
> >
d
- "Infinity" is a literal
- "-Infinity" is a very unlikely value for an upper bound
How about the attached version?
Yours,
Laurenz Albe
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index c76ec52c55..c2f266ea24 100644
--
On Fri, 2023-11-03 at 09:53 -0400, Bruce Momjian wrote:
> On Thu, Nov 2, 2023 at 09:51:58PM -0400, Bruce Momjian wrote:
> > On Wed, Nov 1, 2023 at 09:31:52PM +0100, Laurenz Albe wrote:
> > > There is another patch in the current commitfest that addresses a similar
> >
to answer "why not?". It is not a security
problem, in my opinion. Every user is allowed to know that I have a table
"purchase" with a column "credit_card_nr". As long as the permissions are set
correctly, that is no problem. Any attempt to hide that information is at best
"security by obscurity".
Yours,
Laurenz Albe
On Wed, 2023-11-08 at 05:31 -0700, David G. Johnston wrote:
> On Wednesday, November 8, 2023, Laurenz Albe wrote:
> > When people ask my "why?", I tend to answer "why not?". It is not a
> > security
> > problem, in my opinion. Every user is allowed
st2 the table is created in
> schema1. So table would look like "schema1.domain". Any idea on how we can
> setup such subscription such that schema name shouldn't be an issue.
That is not supported yet. You cannot do that.
Yours,
Laurenz Albe
On Mon, 2023-11-13 at 16:08 -0500, Bruce Momjian wrote:
> Backpatched to PG 16.
Thanks!
Yours,
Laurenz Albe
standby does not respond in time, you normally have worse
problems than NOTIFY performance.
Yours,
Laurenz Albe
ng functions.
I think the example had best be at "8.5.2. Date/Time Output", in
doc/src/sgml/datatype.sgml around line 2552.
Yours,
Laurenz Albe
On Tue, 2023-11-21 at 22:27 -0500, Bruce Momjian wrote:
> I like this six year old patch so would like to apply it to master,
> attached.
+1, since it is arguably a bug fix.
Yours,
Laurenz Albe
agree that the paragraph you are trying to improve needs it.
I am not sure about that last sentence you added:
The modification of
EXCLUDED columns has similar interactions.
How do you modify an EXCLUDED column? Are you talking about a BEFORE
INSERT trigger? Reading the original text, I get the impression that
it means "the behavior is obvious if you modify a column that is used
with EXCLUDED in the DO UPDATE clause, but it can also happen if that
column is not user with EXCLUDED".
Perhaps you should omit that sentence for clarity.
Yours,
Laurenz Albe
On Wed, 2023-11-22 at 14:49 -0800, Peter Geoghegan wrote:
> I don't think that your proposed wording for this is an improvement.
Well, the existing wording is impenetrable even for someone with some
PostgreSQL knowledge, like me.
Yours,
Laurenz Albe
On Wed, 2023-11-22 at 11:58 -0500, Bruce Momjian wrote:
> Okay, I moved it into the "Note" section that talked about ISO 8601
> output with "T", in the attached patch.
Fine by me, except that I would rather have "returns" or "produces"
instead of th
On Fri, 2023-11-24 at 12:29 -0500, Bruce Momjian wrote:
> On Thu, Nov 23, 2023 at 09:29:39AM +0100, Laurenz Albe wrote:
> > On Wed, 2023-11-22 at 11:58 -0500, Bruce Momjian wrote:
> > > Okay, I moved it into the "Note" section that talked about ISO 8601
> > > o
On Fri, 2023-11-24 at 13:14 -0500, Bruce Momjian wrote:
> On Thu, Nov 23, 2023 at 08:36:34AM +0100, Laurenz Albe wrote:
> > On Wed, 2023-11-22 at 14:49 -0800, Peter Geoghegan wrote:
> > > I don't think that your proposed wording for this is an improvement.
> >
>
ronounced "juneek", which
does not start with a vowel.
> I personally thought this part is obscure.
True; I don't find it documented that all objects in pg_class share a
namespace and that constraints are implemented by indexes of the same
name. But I think that the first
In 99% of all cases, don't create a tablespace in PostgreSQL. Just use
the default tablespace.
In a virtualized environment, don't ever create a tablespace.
Tablespaces were more important back what people had physical boxes
with physical disks of limited size.
There are still some use cases, but they are extremely rare.
Yours,
Laurenz Albe
e to apply this to PG 16 and master.
I had to read the text twice before I understood it, but I cannot think
of a simpler way to write it.
Yours,
Laurenz Albe
On Thu, 2024-01-18 at 15:54 +0100, Peter Eisentraut wrote:
> On 27.11.23 03:30, Laurenz Albe wrote:
> > True; I don't find it documented that all objects in pg_class share a
> > namespace and that constraints are implemented by indexes of the same
> > name. But I thin
re transferred to the new owner
+ along with the ownership.
Yours,
Laurenz Albe
For months now, I have received this automated reply whenever I post to
this list:
Forwarded Message
From: 471266196 <471266...@qq.com>
To: Laurenz Albe
Subject: 自动回复: Re: SQL command : ALTER DATABASE OWNER TO
Date: 01/24/2024 03:23:31 PM
邮件已收到,我会尽
new owner along with the ownership
But that is what happens.
The permissions are transferred to the new owner, so the old owner doesn't
have any privileges on the object (and, in your case, cannot connect to
the database any more).
Yours,
Laurenz Albe
Policies
╪═══╪═══╪═╪═══╪══
public │ mytab │ table │ laurenz=arwdDxt/laurenz │ │
(1 row)
Yours,
Laurenz Albe
to the new role; leaving the old role without any direct
> privileges on the object.
> + Multiple privilege entries with the same grantor and grantee are
> consolidated into a single entry.
>
This change is fundamentally OK, although I doubt that we need to get as
detailed
as to how multiple access control items get consolidated.
I think we should say "owner" instead of "recorded owner". Also, is it
necessary
to detail to the level of system catalog columns?
Yours,
Laurenz Albe
/rewrite/plan/optimize the subsequent (pipelined) queries
> (issued from the same transaction). Neither chapter 55 nor 52 expand on it
> (or it’s hard to spot at least).
No, PostgreSQL is single-threaded (with the exception of parallel query
execution).
Yours,
Laurenz Albe
On Wed, 2024-01-24 at 15:26 +0100, Daniel Gustafsson wrote:
> > On 24 Jan 2024, at 15:23, Laurenz Albe wrote:
> >
> > On Wed, 2024-01-24 at 11:08 +0100, gp...@free.fr wrote:
> > > for this "ALTER DATABASE" form, it should be mentioned that after
> >
On Fri, 2024-01-26 at 19:01 +0530, vignesh C wrote:
> CFBot shows that the patch does not apply anymore as in [1]:
There was a conflict with 46a0cd4cefb.
Updated version attached.
Yours,
Laurenz Albe
From 193d6d6c20f0c2976e0b63f1896978545def3fe8 Mon Sep 17 00:00:00 2001
From: Laurenz Albe
D
gt; What are the differences in privilege checks?
>
> How are the two commands the same and different, semantically?
The difference is revealed by "SELECT session_user".
I think that is pretty clearly described in the SET SESSION AUTHORIZATION
documentation page.
Yours,
Laurenz Albe
On Wed, 2024-01-31 at 12:11 +0100, Peter Eisentraut wrote:
> Sprinkled in some of David's suggestions, and pushed.
Thanks; your text is great.
Yours,
Laurenz Albe
; That sentence in that location is correct. See “birthday paradox”.
To be more precise: if 15 other transactions are currently running, there
is a bigger chance that at least one of them will want to flush WAL before
"commit_delay" has expired than if there are only 3 other transactions.
Yours,
Laurenz Albe
On Mon, 2024-02-19 at 09:37 +, PG Doc comments form wrote:
> Page: https://www.postgresql.org/docs/16/sql-security-label.html
>
> FOREIGN TABLE object_name
>
> ...probably should have a following "|", I think?
Absolutely!
Yours,
Laurenz Albe
server.'
I think that applies to all options. It would be better to have a general
statement to that effect at the beginning of the "Options" section.
Yours,
Laurenz Albe
d
2024-02-29 12:00:00 - 1 year = 2024-02-28 12:00:00 - 1 year
I'd say that there is simply no way to make all this consistent,
and the current implementation is what I would intuitively expect.
Yours,
Laurenz Albe
lue relative to seq_page_cost will cause the system to
> prefer index scans; reducing it will make index scans look relatively more
> expensive."
The documentation is correct. If the cost of a random I/O operation is
higher, index scans look more expensive, because they perform random I/O.
Yours,
Laurenz Albe
ted version of the row that is
locked
and returned to the client.
Yours,
Laurenz Albe
patch for that page that demonstrates
the lost update and shows how to avoid it using the REPEATABLE READ
isolation level?
Yours,
Laurenz Albe
ent
version.
Yours,
Laurenz Albe
g I/O across
different disks, but to prevent the data files from filling the WAL disk.
Yours,
Laurenz Albe
rray. Is this the
> intended behavior?
>
> SELECT '{3,1,1,2,2,2}'::int[] - 1; --> {3,2,2,2} as you would expect
> SELECT '{3,1,1,2,2,2}'::int[] - '{1}'::int[]; --> {2,3} instead of
> {3,2,2,2}
There is no harm in documenting that; I propose the at
On Tue, 2024-03-19 at 11:04 -0400, Greg Sabino Mullane wrote:
> On Mon, Mar 18, 2024 at 11:58 AM Laurenz Albe
> wrote:
> > I think it is still a good idea to put data files and WAL on different file
> > systems. Perhaps not so much with the intention of distributing I/O ac
e, ACCESS SHARE MODE is
permitted."
Yours,
Laurenz Albe
LECT ('{"a": 1}'::jsonb)['a'];
>
> -- Extract nested object value by key path
> SELECT ('{"a": {"b": {"c": 1}}}'::jsonb)['a']['b']['c'];
>
> -- Extract array element by index
> SELECT ('[1, "2", null]'::jsonb)[1];
You must be using an old PostgreSQL version where that is not yet supported.
Yours,
Laurenz Albe
and have
been
granted the predefined role with the ADMIN option)
can GRANT these roles to users and/or other roles ...
Yours,
Laurenz Albe
remote TCP connections.
Then "listen_addresses" could hyperlink to the parameter's documentation.
Yours,
Laurenz Albe
EGIN NULL; END;';
SELECT prokind FROM pg_proc WHERE proname = 'noop';
prokind
═
p
(1 row)
Yours,
Laurenz Albe
any columns added to the table later
> are automatically replicated.
>
> ~~
>
> I attached a small patch to make the above change.
+1 on that change.
Yours,
Laurenz Albe
backup file.
> + least one schema/table in the file to be restored.
>
> Would it make sense to use "import" in some cases instead?
What about calling it "dump file" instead of "file to be restored"?
Yours,
Laurenz Albe
ot;? It is perhaps not accurate,
because a Datum need not be stored in a column, but it might be readily
understandable.
Yours,
Laurenz Albe
bout“ the operating system's default
> value in the linux is tcp_keepalive_time kernel parameter”
Documenting the defaults for each supported operating system is not
PostgreSQL's task.
In this article[1], I figured out the defaults for Linux, MacOS
and Windows.
Yours,
Laurenz
input: use of
> > > upper-case digits
Hexadecimal digits, also known as letters.
Yours,
Laurenz Albe
nction returns the first of its arguments that is distinct
> from null. Null is returned only if all arguments are not distinct from null.
+1
Do you want to write a documentation patch?
Yours,
Laurenz Albe
documentation. That is, the implementation should behave like the
> documentation suggests.
You are right. I find this in the standard:
COALESCE (V1, V2) is equivalent to the following :
CASE WHEN V1
IS NOT NULL THEN
V1 ELSE
V2 END
That would mean that coalesce(ROW(1,NULL), ROW(2,1)) should return
the second argument. Blech. I am worried about the compatibility pain
such a bugfix would cause...
Yours,
Laurenz Albe
..and as far as I could test, in Oracle the IS NULL and IS NOT NULL
> operators are truly dual
That only goes to say that Oracle is not very standard compliant, but
I wouldn't expect anything else from a system where '' IS NULL.
Yours,
Laurenz Albe
be more complete.
Suggestions:
Here is a variation of the above example:
A variation of the above example is:
Yours,
Laurenz Albe
ind new patch version fix_doc_raise_v4.patch,
> please check it out.
Thanks. I have marked the patch as "ready for committer".
Yours,
Laurenz Albe
havior in more detail?
It is difficult to help you if you are that unspecific about what exactly
you fail to understand. Sure, there are some complicated concepts involved.
If you can't understand *anything* about that text, perhaps you should
start reading the whole chapter about concurrency.
Yours,
Laurenz Albe
n time.
+1
Here is a patch for that; it may be the smallest patch I've ever
written for PostgreSQL.
Yours,
Laurenz Albe
From 68eedd01c754ffd2dfbb11cd29f568841d7db7a6 Mon Sep 17 00:00:00 2001
From: Laurenz Albe
Date: Wed, 24 Jul 2024 12:50:49 +0200
Subject: [PATCH v1] Fix a missing article i
type" is not the same as "the table has changed
persistence"
and at the same time "a column has changed a default value".
Perhaps "a bitmap of reasons" should simply become "the reason".
Yours,
Laurenz Albe
On Tue, 2024-09-03 at 11:54 -0400, Greg Sabino Mullane wrote:
> How about something like this?
This patch looks good to me.
Yours,
Laurenz Albe
On Wed, 2019-11-13 at 17:17 -0500, Tom Lane wrote:
> Laurenz Albe writes:
> > I realized only today that if role A is a member of role B,
> > A can ALTER and DROP objects owned by B.
> > I don't have a problem with that, but the documentation seems to
> > suggest o
ot;peer".
- I couldn't see anything about Windows.
I think that particularly on Windows people would need a tutorial most,
not because Windows people are more clueless, but because things work
differently there. Many Windows users don't know how to start a shell.
Yours,
Laurenz Albe
1 - 100 of 245 matches
Mail list logo