Re: [HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-09-10 Thread Markus Sintonen
Hi Marko! Thanks for the good feedback. Good point on the pg_listening_channels(). Do you think we could change the interface of the function? At least PG v10 has changed functions elsewhere quite dramatically eg. related to xlog functions. We could change the pg_listening_channels() return type t

Re: [HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-09-07 Thread Marko Tiikkaja
Hi Markus, On Sun, Aug 20, 2017 at 9:56 PM, Markus Sintonen wrote: > I also encountered this when I built it with different configuration. I > attached updated patch with the correct number of arguments to > 'similar_escape'. I also added preliminary documentation to the patch. > (Unfortunately

Fwd: [HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-08-22 Thread Markus Sintonen
I also encountered this when I built it with different configuration. I attached updated patch with the correct number of arguments to 'similar_escape'. I also added preliminary documentation to the patch. (Unfortunately unable to currently compile the documentation for testing purpose on Windows p

Re: [HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-08-18 Thread Thomas Munro
On Tue, Aug 1, 2017 at 8:13 AM, Markus Sintonen wrote: > This patch adds an ability to use patterns in LISTEN commands. Patch uses > 'SIMILAR TO' patterns for matching NOTIFY channel names > (https://www.postgresql.org/docs/9.0/static/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP). > > This p

Re: [HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-08-01 Thread Markus Sintonen
The following does not work: LISTEN 'foo%' Neither this: LISTEN SIMILAR TO "foo%" This works: LISTEN "foo%" But it does not act as a pattern. We could change the SIMILAR TO something like following (accepting also type of the pattern), for example: LISTEN PATTERN 'foo%' TYPE 'similar' LISTEN PATTE

Re: [HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-07-31 Thread Peter Eisentraut
On 7/31/17 16:13, Markus Sintonen wrote: > This patch has no know backward compatibility issues with the existing > /LISTEN///UNLISTEN/ features. This is because patch extends the existing > syntax by accepting quoted strings which define the patterns as opposed > to the existing SQL literals. I d

[HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-07-31 Thread Markus Sintonen
Hi This patch adds an ability to use patterns in *LISTEN* commands. Patch uses '*SIMILAR TO*' patterns for matching *NOTIFY* channel names ( https://www.postgresql.org/docs/9.0/static/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP ). This patch is related to old discussion in https://www.post