Re: [PATCH] Add get_bytes() and set_bytes() functions

2024-08-14 Thread David Fetter
On Wed, Aug 14, 2024 at 05:39:32PM +0200, Joel Jacobson wrote: > On Wed, Aug 14, 2024, at 16:43, David Fetter wrote: > >> I also think it would be nice to provide these convenience functions: > >> to_bytes(bigint) -> bytea > >> from_bytes(bytea) -> bigint >

Re: [PATCH] Add get_bytes() and set_bytes() functions

2024-08-14 Thread David Fetter
> > I agree those functions would be nice too. > > I also think it would be nice to provide these convenience functions: > to_bytes(bigint) -> bytea > from_bytes(bytea) -> bigint Along with these, would it make sense to have other forms of these that won't choke at 63 bits, e.g. NUMERIC or TEXT? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778

Re: Finer grain log timestamps

2022-06-13 Thread David Fetter
On Mon, Jun 13, 2022 at 04:22:42PM -0400, Tom Lane wrote: > Robert Haas writes: > > On Sun, May 8, 2022 at 4:45 PM David Fetter wrote: > >> Please find attached a patch to change the sub-second granularity of > >> log timestamps from milliseconds to microseconds. >

Re: Parse CE and BCE in dates and times

2022-06-13 Thread David Fetter
On Mon, Jun 13, 2022 at 09:11:56AM +0200, Erik Rijkers wrote: > Op 13-06-2022 om 07:51 schreef David Fetter: > > Folks, > > > > Please find attached a patch to do $Subject. As dates in a fair number > > of fields of endeavor are expressed this way, it seems reasonab

Re: Finer grain log timestamps

2022-06-13 Thread David Fetter
On Mon, May 09, 2022 at 11:21:26AM +0100, Dagfinn Ilmari Mannsåker wrote: > David Fetter writes: > > > diff --git src/backend/utils/error/elog.c src/backend/utils/error/elog.c > > index 55ee5423af..4698e32ab7 100644 > > --- src/backend/utils/error/elog.c > > +++

Parse CE and BCE in dates and times

2022-06-12 Thread David Fetter
similar that would require careful consideration. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >From 00654ad8707fef0c9bcb7a8b6a8073d1f143368a Mon Sep 17 00:00:00 2001 From: David Fet

Re: Finer grain log timestamps

2022-05-08 Thread David Fetter
On Sun, May 08, 2022 at 04:12:27PM -0500, Justin Pryzby wrote: > On Sun, May 08, 2022 at 08:44:51PM +0000, David Fetter wrote: > > CREATE TABLE postgres_log > > ( > > - log_time timestamp(3) with time zone, > > + log_time timestamp(6) with time zone, > > Ple

Finer grain log timestamps

2022-05-08 Thread David Fetter
I believe might have been a requirement for C11, should be wish to get sub-microsecond granularity. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >F

Re: Should we support new definition for Identity column : GENERATED BY DEFAULT ON NULL?

2021-11-03 Thread David Fetter
RE, or whether we should care about anything it happens to say that gets in the way of doing something more helpful. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: PATCH: psql tab completion for SELECT

2021-10-08 Thread David Fetter
rebased and updated these to be more principled about what functions could be tab completed. Still missing: tests. What precisely is this supposed to do? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://w

Re: When is int32 not an int32?

2021-09-26 Thread David Fetter
iscuss reversing our claim that we support such systems, seeing as it doesn't appear that people will be deploying new versions of PostgreSQL on them. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: psql: tab completion differs on semicolon placement

2021-09-20 Thread David Fetter
pop one or more stacks holding state as each character came in? I suspect the overhead would be unnoticeable even on the slowest* client. Best, David. * One possible exception would be a gigantic paste, a case where psql can be prevented from attempting tab completion, although the prevention measures involve a pretty obscure terminal setting: https://cirw.in/blog/bracketed-paste Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Hook for extensible parsing.

2021-09-15 Thread David Fetter
t languages for specific > users or databases. That's a great idea, but I must be missing something important as it relates to parser hooks. Could you connect those a little more explicitly? Best, David. * It's not actually a heap in the sense that the term is normally used in compu

Re: Bug fix for tab completion of ALTER TABLE ... VALIDATE CONSTRAINT ...

2021-09-14 Thread David Fetter
nfo_charp = prev3_wd; > > + COMPLETE_WITH_QUERY(Query_for_nonvalid_constraint_of_table); > > + } > > Specifying valid constraints is an authorized grammar, so it does not > > seem that bad to keep things as they are, either. I would leave that > > alo

Re: Mark all GUC variable as PGDLLIMPORT

2021-08-23 Thread David Fetter
;m pretty sure we actually need to see documenting that as a thing that does actually go to core database functionality. Yes, there are resources involved with doing a thing like this, but I don't think that they require constant or even frequent attention from committers or even from seasoned DB hackers. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Default to TIMESTAMP WITH TIME ZONE?

2021-08-15 Thread David Fetter
nger than SQL has existed. If we're going to capture input time zones, we should come up with a way to capture the time zone as it existed when the write occurred, i.e. both its name and the UTC offset it represented at that time of the write. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Slim down integer formatting

2021-07-27 Thread David Fetter
ms 174.013 ms latency stddev:1.94 ms 6.84 ms which doesn't look like a difference to me. Intuitively, I'd expect us to get things in the neighborhood of 1 a lot more often than things in the neighborhood of 1 << (30 or 60). Do we have some idea of the distri

Slim down integer formatting

2021-07-26 Thread David Fetter
a better way to do this? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >From 1cf7202facd9fee161865d90304e5ede1e3c65cf Mon Sep 17 00:00:00 2001 From: David Fetter Date: Mon, 26

Re: [PATCH] Allow multiple recursive self-references

2021-07-18 Thread David Fetter
e so kind as to include updated documentation of the feature and at least one regression test of same? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Use singular number when appropriate

2021-06-15 Thread David Fetter
On Tue, Jun 15, 2021 at 09:37:11AM +0200, Laurenz Albe wrote: > On Tue, 2021-06-15 at 04:59 +0000, David Fetter wrote: > > I thought about using the dual, but wasn't sure how many languages > > support it. > > I think none of the languages for which we cater uses the dua

Use singular number when appropriate

2021-06-14 Thread David Fetter
Hi, I thought about using the dual, but wasn't sure how many languages support it. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >From 1fd595576c5972d8604adf77d1959008daeb

Re: pg_receivewal makes a bad daemon

2021-05-05 Thread David Fetter
a of how (not) to design the APIs to them. I'm going to guess that anything with an incompatible license will upset people who are accustomed to ensuring that we have what legally amounts to an MIT license clean distribution, but I'm thinking that option is at least worth discussing, even if the immediate consensus is, "libreadline is bad enough. We went to a lot of trouble to purge that other stuff back in the bad old days. Let's not make that mistake again." Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Make some column descriptions easier to distinguish visually

2021-05-05 Thread David Fetter
est, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >From 4202229a9319fa2f307b2761696775a2c5905fcd Mon Sep 17 00:00:00 2001 From: David Fetter Date: Wed, 5 May 2021 15:48:53 -0700 Subje

Re: Bug fix for tab completion of ALTER TABLE ... VALIDATE CONSTRAINT ...

2021-04-27 Thread David Fetter
E TABLE > eax=# alter table foo add constraint bar check (x < 3) not valid; > ALTER TABLE > eax=# alter table foo add constraint baz check (x <> 5) not valid; > ALTER TABLE > eax=# alter table foo validate constraint ba > bar baz > eax=# alter table foo validate constraint

Bug fix for tab completion of ALTER TABLE ... VALIDATE CONSTRAINT ...

2021-04-26 Thread David Fetter
Folks, I noticed that $subject completes with already valid constraints, please find attached a patch that fixes it. I noticed that there are other places constraints can be validated, but didn't check whether similar bugs exist there yet. Best, David. -- David Fetter http://fetter.org/

Re: popcount

2021-03-24 Thread David Fetter
On Tue, Mar 23, 2021 at 10:51:08AM +0100, Peter Eisentraut wrote: > On 21.03.21 02:31, David Fetter wrote: > > > I have now read the entire internet on what a suitable name for this > > > function could be. I think the emerging winner is BIT_COUNT(), which > > > alr

Re: popcount

2021-03-20 Thread David Fetter
I have now read the entire internet on what a suitable name for this > function could be. I think the emerging winner is BIT_COUNT(), which > already exists in MySQL, and also in Python (int.bit_count()) and Java > (Integer.bitCount()). Thanks for doing this tedious work. Please find attache

Re: WIP: document the hook system

2021-03-10 Thread David Fetter
s them to drift > > away from matching the code, which makes the hook documentation actually > > worse than having no hook documentation at all. > > There's doesn't seem to be agreement on how to proceed here, so closing. > > David, if you do decide to proceed with a READM

Re: [PATCH] pg_permissions

2021-03-07 Thread David Fetter
t; All catalogs with _aclitem columns have been included in the view. > > I think a similar one for ownerships would be nice too. > But I'll let you digest this one first to see if the concept is fruitful. +1 for both this and the ownerships view. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: WIP: document the hook system

2021-03-06 Thread David Fetter
On Fri, Feb 12, 2021 at 08:02:51PM +0300, Anastasia Lubennikova wrote: > On 17.01.2021 16:53, Magnus Hagander wrote: > > On Fri, Jan 15, 2021 at 8:28 AM Peter Eisentraut > > wrote: > > > On 2020-12-31 04:28, David Fetter wrote: > > > > This could probably use a

Re: [patch] bit XOR aggregate functions

2021-03-06 Thread David Fetter
On Sat, Mar 06, 2021 at 09:03:25PM +0100, Vik Fearing wrote: > On 3/6/21 9:00 PM, David Fetter wrote: > > On Sat, Mar 06, 2021 at 08:57:46PM +0100, Vik Fearing wrote: > >> On 3/6/21 8:55 PM, David Fetter wrote: > >>> On Wed, Mar 03, 2021 at 03:30:15PM +0100, Pet

Re: [patch] bit XOR aggregate functions

2021-03-06 Thread David Fetter
On Sat, Mar 06, 2021 at 08:57:46PM +0100, Vik Fearing wrote: > On 3/6/21 8:55 PM, David Fetter wrote: > > On Wed, Mar 03, 2021 at 03:30:15PM +0100, Peter Eisentraut wrote: > >> On 10.02.21 06:42, Kyotaro Horiguchi wrote: > >>> We already had CREATE AGGREATE

Re: [patch] bit XOR aggregate functions

2021-03-06 Thread David Fetter
uous ORDER BY, as illustrated below? SELECT BIT_XOR(b ORDER BY a, c).../* works */ SELECT BIT_XOR(b) OVER (ORDER BY a, c)... /* works */ SELECT BIT_XOR(b) FROM... /* errors out */ Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Public APIs

2021-03-06 Thread David Fetter
ould documenting these APIs be the right place to start? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Feedback on table expansion hook (including patch)

2021-03-06 Thread David Fetter
ect that that process will expose bits of the planning and execution machinery that have gotten less isolated than they should be. More generally, and I'll start a separate thread on this, we should be working up to including a reference implementation, however tiny, of every extension point we

Re: regexp_positions()

2021-02-27 Thread David Fetter
e a little too cute and not easy ever to extend. Come to that, would a row structure that looked like (match, start, end) be useful? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Extensibility of the PostgreSQL wire protocol

2021-02-22 Thread David Fetter
t serve requests from the parts that execute queries also goes a long way toward things we've wanted for quite awhile like admission control systems and/or seamless zero-downtime upgrades. Separately, as the folks at AWS and elsewhere have mentioned, being able to pretend at some level to be a

Re: computing dT from an interval

2021-02-22 Thread David Fetter
YY') - to_timestamp('1752', ''); ?column? ══ 366 days (1 row) I'd like to imagine nobody will ever go mucking with the calendar to the extent the British did that year, but one never knows. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Extensions not dumped when --schema is used

2021-02-21 Thread David Fetter
> + -e class="parameter">pattern > + --extension= class="parameter">pattern > + > + > +Dump only extensions matching +class="parameter">pattern. When this option is not > +specified, all non-system extensions in the target database will be > +dumped. Multiple schemas can be selected by writing multiple I think this should read "Multiple extensions". Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: [Proposal] Page Compression for OLTP

2021-02-18 Thread David Fetter
n now and the end of the CF to review the patch, work on it, etc, and the CF bot will be testing it against the changing code base to ensure people know if such a change causes it to need a rebase. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Tid scan improvements

2021-02-16 Thread David Fetter
he new > names are a bit more aligned to the existing names. Thanks! I'm looking forward to making use of this :) Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Fuzz testing COPY FROM parsing

2021-02-05 Thread David Fetter
! The way it's already produced results is impressive. Looking at honggfuzz, I see it's been used for wire protocols, of which we have several. Does testing our wire protocols seem like a big lift? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Co

Re: Add SQL function for SHA1

2021-01-25 Thread David Fetter
ars before repositories have converted over. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: popcount

2021-01-19 Thread David Fetter
y function comments which leave it up in the air as to which positional argument does what in functions like string_to_array, which take multiple arguments. I'll try to get a patch in for the next CF with a fix for that, and a separate one that doesn't put it on people to use \df+ to find t

Re: popcount

2021-01-18 Thread David Fetter
aggregates, such as var_pop(). > > Perhaps something along the lines of count_ones() or count_set_bits() > would be more apropos. Done that way. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.or

Re: NOT VALID for Unique Indexes

2021-01-17 Thread David Fetter
s broadly more dangerous and ill-advised. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: popcount

2021-01-11 Thread David Fetter
On Mon, Jan 11, 2021 at 03:50:54PM +0100, Peter Eisentraut wrote: > On 2020-12-30 17:41, David Fetter wrote: > > > The input may have more than 2 billion bits set to 1. The biggest possible > > > result should be 8 billion for bytea (1 GB with all bits set to 1). > > &

Re: Implement for window functions

2021-01-03 Thread David Fetter
s step = (target > 0) - (target < 0); Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Tid scan improvements

2020-12-31 Thread David Fetter
to make it possible to parallelize dumps of large tables by working separately on each underlying file, of which there could be quite a few for a large one. Will try to understand the suggestions upthread better and implement same. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 23

WIP: document the hook system

2020-12-30 Thread David Fetter
Please find attached :) This could probably use a lot of filling in, but having it in the actual documentation beats needing to know folklore even to know that the capability is there. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating

Re: Let people set host(no)ssl settings from initdb

2020-12-30 Thread David Fetter
On Wed, Dec 30, 2020 at 03:00:17PM -0500, Tom Lane wrote: > David Fetter writes: > > On Wed, Dec 30, 2020 at 08:24:06PM +0100, David Fetter wrote: > >> On Mon, Sep 07, 2020 at 11:57:58AM +0900, Michael Paquier wrote: > >>> I have looked at the patch of this th

Re: Implement for window functions

2020-12-30 Thread David Fetter
On Wed, Dec 30, 2020 at 09:32:26PM +0200, Krasiyan Andreev wrote: > Hi, after latest committed patches about multirange datatypes, I get a > compilation error, Oh, right. I'd been meaning to send a patch to fix that. Here it is. Best, David. -- David Fetter http://fetter.org/ Phone:

Re: Let people set host(no)ssl settings from initdb

2020-12-30 Thread David Fetter
On Wed, Dec 30, 2020 at 08:24:06PM +0100, David Fetter wrote: > On Mon, Sep 07, 2020 at 11:57:58AM +0900, Michael Paquier wrote: > > On Thu, Jul 02, 2020 at 04:02:21PM +0200, Daniel Gustafsson wrote: > > > The CF Patch Tester consider this patch to be malformed and is unab

Re: Let people set host(no)ssl settings from initdb

2020-12-30 Thread David Fetter
change at runtime) some kind of cryptographic policy, as SSH and TLS do. While I see this as a worthy goal, it's a much bigger lift than an optional argument or two to initdb, and requires a lot more discussion than it's had to date. Best, David. -- David Fetter http://fetter.org/ Pho

Re: popcount

2020-12-30 Thread David Fetter
On Wed, Dec 30, 2020 at 05:27:04PM +0100, Daniel Verite wrote: > David Fetter wrote: > > +Datum > +byteapopcount(PG_FUNCTION_ARGS) > +{ > + bytea *t1 = PG_GETARG_BYTEA_PP(0); > + int len, result; > + > + len = VARSIZE_ANY_EXHDR(t1); &

popcount

2020-12-30 Thread David Fetter
Hi, Per request, I'd like to see about surfacing $Subject to SQL. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >From 28c9b7acad605197a8a242ff929bcce6f3100c91 Mon Sep 17

Re: range_agg

2020-12-27 Thread David Fetter
On Sun, Dec 27, 2020 at 09:53:13AM -0800, Zhihong Yu wrote: > Hi, > > This is not an ideal way to index multirages, but something we can > easily have. What sort of indexing improvements do you have in mind? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778

Re: \gsetenv

2020-12-20 Thread David Fetter
On Sun, Dec 20, 2020 at 10:42:40PM +0200, Heikki Linnakangas wrote: > On 20/12/2020 21:05, David Fetter wrote: > > We have plenty of ways to spawn shells and cause havoc, and we > > wouldn't be able to block them all even if we decided to put a bunch > > of pretty onero

Re: \gsetenv

2020-12-20 Thread David Fetter
On Sun, Dec 20, 2020 at 01:07:12PM -0500, Tom Lane wrote: > David Fetter writes: > > On Sun, Dec 20, 2020 at 02:26:14PM +0100, Fabien COELHO wrote: > >> SELECT 'Calvin' AS foo \gset > >> \setenv FOO :foo > >> \! echo $FOO > >> Calvin > &g

Re: \gsetenv

2020-12-20 Thread David Fetter
k at it as a feature psql users might appreciate having. As the author, I obviously see it that way, but again as the author, it's not for me to make that call. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: \gsetenv

2020-12-16 Thread David Fetter
On Wed, Dec 16, 2020 at 05:30:13PM -0500, Tom Lane wrote: > David Fetter writes: > > We have \gset to set some parameters, but not ones in the environment, > > so I fixed this with a new analogous command, \gsetenv. > > In view of the security complaints we just had about \g

\gsetenv

2020-12-16 Thread David Fetter
Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >From 04059e68ffcd8cf4052ccb6a013f0cf2e0095eb8 Mon Sep 17 00:00:00 2001 From: David Fetter Date: Wed, 16 Dec 2020 13:17:32 -0800 Subject: [PATCH v1] Implem

Re: [HACKERS] [PATCH] Generic type subscripting

2020-12-10 Thread David Fetter
which means that I think a lot > of the commentary around SubscriptingRef is misleading. But I do > not have a better word to suggest offhand. Thoughts? Would this be something more along the lines of a "dependent type," or is that adding too much baggage? Best, David.

Re: SELECT INTO deprecation

2020-12-02 Thread David Fetter
ch > point in them. +1 for removing it entirely and including this prominently in the release notes. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: POC: postgres_fdw insert batching

2020-11-30 Thread David Fetter
but it's also due to the API design. > > You worried about other FDWs than postgres_fdw. That's reasonable. I > insisted in other threads that PG developers care only about postgres_fdw, > not other FDWs, when designing the FDW interface, but I myself made the same >

Clarifying the ImportForeignSchema API

2020-08-03 Thread David Fetter
. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Bump default wal_level to logical

2020-06-08 Thread David Fetter
bigger change though, but perhaps it is now possible once > we have the "global barriers" in 13? As much as I would love to have this capability, I was hoping to keep the scope of this contained. As pointed out down-thread, there's lots more to doing this dynamically that just tu

Bump default wal_level to logical

2020-06-07 Thread David Fetter
Hi, I'd like to propose $subject, as embodied in the attached patch. This makes it possible to discover and fulfill a need for logical replication that can arise at a time when bouncing the server has become impractical, i.e. when there is already high demand on it. Best, David. -- David F

Re: Default gucs for EXPLAIN

2020-06-02 Thread David Fetter
ould be a foot cannon) by default. For those few to whom it really matters, there'd be OFF switches. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Default gucs for EXPLAIN

2020-05-31 Thread David Fetter
re > > creep disaster. > > How about changing the default behavior, making BUFFERS enabled by > default? Those who don't need it, always can say BUFFERS OFF — the > say as for TIMING. +1 for changing the default of BUFFERS to ON. Best, David. -- David Fetter http://fet

Re: proposal: possibility to read dumped table's name from file

2020-05-29 Thread David Fetter
pg_restore -L <(pg_dump -l /path/to/dumpfile | grep -f /path/to/listfile) -d new_db /path/to/dumpfile That's a lot of shell magic and obscure corners of commands to expect people to use. Would it make sense to expand this patch to handle other objects? Best, David. -- David Fetter h

Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch

2020-05-25 Thread David Fetter
; It looks like those bits should reliably be zero right now. +1 for adding +/- infinity to NUMERIC. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: factorial function/phase out postfix operators?

2020-05-18 Thread David Fetter
he > feature deprecation in (at least) the CREATE OPERATOR man page, and > we'd have to decide how many release cycles the deprecation notices > need to stand for. > > If that's the intention, though, it'd be good to get those deprecation > notices published in

Re: Proposing WITH ITERATIVE

2020-04-27 Thread David Fetter
On Mon, Apr 27, 2020 at 10:44:04PM -0400, Jonah H. Harris wrote: > On Mon, Apr 27, 2020 at 10:32 PM David Fetter wrote: > > On Mon, Apr 27, 2020 at 12:52:48PM -0400, Jonah H. Harris wrote: > > > Hey, everyone. > > > > > If there's any interest, I'l

Re: Proposing WITH ITERATIVE

2020-04-27 Thread David Fetter
On Mon, Apr 27, 2020 at 12:52:48PM -0400, Jonah H. Harris wrote: > Hey, everyone. > If there's any interest, I'll clean-up their patch and submit. Thoughts? Where's the current patch? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vo

Re: Commitfest 2020-03 Now in Progress

2020-04-08 Thread David Fetter
gt; (committed, etc.) at the beginning of the CF has been moved to an > > uncompleted state. Or perhaps my math is just bad. > > > > The RMT has determined that the CF will be extended for one week so I'll > > hold off on moving and marking patches until Apri

Re: Let people set host(no)ssl settings from initdb

2020-04-08 Thread David Fetter
with_token() function definition so it would be always > available, which is used to remove the @tokens@ in case user does > not specify a default auth method for the new hostssl, hostgss > options. I think you should also remove the "#ifndef > HAVE_UNIX_SOCKETS" around it

Re: range_agg

2020-03-10 Thread David Fetter
oposed, complete with concrete use cases that could really make PostgreSQL stand out. That we don't have an obvious choice of "most correct" operation over which to close ranges makes it even bigger a potential foot-gun when we choose one arbitrarily and declare it to be

Re: Use compiler intrinsics for bit ops in hash

2020-03-08 Thread David Fetter
On Mon, Mar 02, 2020 at 12:45:21PM -0800, Jesse Zhang wrote: > Hi David, > > On Wed, Feb 26, 2020 at 9:56 PM David Fetter wrote: > > > > On Wed, Feb 26, 2020 at 09:12:24AM +0100, David Fetter wrote: > > > On Fri, Jan 31, 2020 at 04:59:18PM +0100, David Fetter wrote

Re: range_agg

2020-03-07 Thread David Fetter
On Sat, Mar 07, 2020 at 06:45:44PM -0500, Tom Lane wrote: > David Fetter writes: > > There's another use case not yet covered here that could make this > > even more complex, we should probably plan for it: multi-ranges > > with weights. > > I'm inclined to r

Re: range_agg

2020-03-07 Thread David Fetter
have a cardinality, and each range within would have a weight, all of which would be an increasingly heavy burden on the common case where there's just a single range. Enhancing a separate multirange type to have weights seems like a cleaner path forward. Given that, I'm -1 on mushing multi-ranges into a special case of ranges, or /vice versa/. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: proposal \gcsv

2020-02-29 Thread David Fetter
format. There is only one generic format for data - csv. Not exactly. There's a lot of uses for things along the lines of \gf json \gf yaml I'd rather add a new \gf that takes arguments, as it seems more extensible. For example, there are uses for \gf csv header if no header is the

Re: Use compiler intrinsics for bit ops in hash

2020-02-28 Thread David Fetter
On Thu, Feb 27, 2020 at 02:41:49PM +0800, John Naylor wrote: > On Thu, Feb 27, 2020 at 1:56 PM David Fetter wrote: > > [v6 set] > > Hi David, > > In 0002, the pg_bitutils functions have a test (input > 0), and the > new callers ceil_log2_* and next_power_of_2

Re: Use compiler intrinsics for bit ops in hash

2020-02-26 Thread David Fetter
On Wed, Feb 26, 2020 at 09:12:24AM +0100, David Fetter wrote: > On Fri, Jan 31, 2020 at 04:59:18PM +0100, David Fetter wrote: > > On Wed, Jan 15, 2020 at 03:45:12PM -0800, Jesse Zhang wrote: > > > On Tue, Jan 14, 2020 at 2:09 PM David Fetter wrote: > > > > > The

Re: truncating timestamps on arbitrary intervals

2020-02-26 Thread David Fetter
On Wed, Feb 26, 2020 at 06:38:57PM +0800, John Naylor wrote: > On Wed, Feb 26, 2020 at 3:51 PM David Fetter wrote: > > > > I believe the following should error out, but doesn't. > > > > # SELECT date_trunc_interval('1 year 1 ms', TIMESTAMP '2001-

Re: Use compiler intrinsics for bit ops in hash

2020-02-26 Thread David Fetter
On Fri, Jan 31, 2020 at 04:59:18PM +0100, David Fetter wrote: > On Wed, Jan 15, 2020 at 03:45:12PM -0800, Jesse Zhang wrote: > > On Tue, Jan 14, 2020 at 2:09 PM David Fetter wrote: > > > > The changes in hash AM and SIMPLEHASH do look like a net positive > > > &g

Re: truncating timestamps on arbitrary intervals

2020-02-25 Thread David Fetter
ve also written tests and very basic documentation. Please find attached an update that I believe fixes the bug I found in a principled way. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/

Re: Error on failed COMMIT

2020-02-24 Thread David Fetter
On Mon, Feb 24, 2020 at 06:40:16PM +0100, Vik Fearing wrote: > On 24/02/2020 18:37, David Fetter wrote: > > > If we'd done this from a clean sheet of paper, it would have been the > > right decision. We're not there, and haven't been for decades. > > OT

Re: Error on failed COMMIT

2020-02-24 Thread David Fetter
s, > it'll merge with all of the following blocks. You may think that > nobody is doing this sort of thing, but I think people are, and that > they will come after us with pitchforks if we break it. I'm doing it, and I don't know about pitchforks, but I do know about suddenly

Re: Parallel copy

2020-02-20 Thread David Fetter
On Thu, Feb 20, 2020 at 02:36:02PM +0100, Tomas Vondra wrote: > On Thu, Feb 20, 2020 at 04:11:39PM +0530, Amit Kapila wrote: > > On Thu, Feb 20, 2020 at 5:12 AM David Fetter wrote: > > > > > > On Fri, Feb 14, 2020 at 01:41:54PM +0530, Amit Kapila wrote: > > &g

Re: Parallel copy

2020-02-19 Thread David Fetter
://github.com/robertdavidgraham/wc2 Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Parallel copy

2020-02-18 Thread David Fetter
ing is needed. > > I am talking about access to shared memory instead of the process > local memory. I understand that an extra copy won't be required. Isn't accessing shared memory from different pieces of execution what threads were designed to do? Best, David. -- David Fetter

Re: Parallel copy

2020-02-15 Thread David Fetter
ething similar that reduces the input alphabet efficiently), then reserve bytes that denote delimiters of various types. ASCII has separators for file, group, record, and unit that we could use as inspiration. I don't have anything to offer for free-form input other than to agree that it looks like a hole with no bottom, and maybe we should just keep that process serial, at least until someone finds a bottom. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: allow frontend use of the backend's core hashing functions

2020-02-14 Thread David Fetter
On Fri, Feb 14, 2020 at 08:16:47AM -0800, Mark Dilger wrote: > > On Feb 14, 2020, at 8:15 AM, David Fetter wrote: > > > > On Fri, Feb 14, 2020 at 10:33:04AM -0500, Robert Haas wrote: > >> On Thu, Feb 13, 2020 at 11:26 AM Mark Dilger > >> wrote: > &g

Re: allow frontend use of the backend's core hashing functions

2020-02-14 Thread David Fetter
e still be available to front-end code? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-02-13 Thread David Fetter
the patch attached? > It's not just pedantry but rather based on a real-life example of someone > reading and being not sure > whether e.g. joins can be used in there. Thanks for doing this! Speaking of examples, there should be more of them illustrating some of the cases you name

Re: Just for fun: Postgres 20?

2020-02-12 Thread David Fetter
e major version in a year before, so we have a track record of that actually happening. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Internal key management system

2020-02-11 Thread David Fetter
question one asks when one wants to get a positive response. > I however do agree that we should strive to not introduce > cryptographic code into the pg source tree - nobody here seems to > have even close to enough experience to maintaining / writing that. +1 for not turning ourselves into implementers of cryptographic primitives. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Use compiler intrinsics for bit ops in hash

2020-01-31 Thread David Fetter
On Wed, Jan 15, 2020 at 03:45:12PM -0800, Jesse Zhang wrote: > On Tue, Jan 14, 2020 at 2:09 PM David Fetter wrote: > > > The changes in hash AM and SIMPLEHASH do look like a net positive > > > improvement. My biggest cringe might be in pg_bitutils: > > > >

Re: Increase psql's password buffer size

2020-01-21 Thread David Fetter
On Tue, Jan 21, 2020 at 07:05:47PM +0100, David Fetter wrote: > On Tue, Jan 21, 2020 at 10:23:59AM -0500, Bruce Momjian wrote: > > On Tue, Jan 21, 2020 at 04:19:13PM +0100, David Fetter wrote: > > > On Tue, Jan 21, 2020 at 10:12:52AM -0500, Bruce Momjian wrote: > > > >

  1   2   3   4   5   >