Re: Strange results when casting string to double

2022-02-17 Thread Carsten Klein
On Thu, Feb 17, 2022 at 00:07 Gavan Schneider wrote: Harking back to my long distant formative years I was taught to never ever rely on equality tests when it came to floating point values. Nothing has changed in this regard. If binary exact is part of the requirement then the answer is I

Re: Strange results when casting string to double

2022-02-17 Thread Thomas Kellerer
Carsten Klein schrieb am 16.02.2022 um 14:27: > I'm using several (now unsupported) PostgreSQL 9.3.24 servers on > different (ancient) Ubuntu 14.04 LTS machines. On only one of those > servers, I get strange/wrong results when converting a string into a > double value: > > SELECT 1.56::double preci

Re: Strange results when casting string to double

2022-02-17 Thread Carsten Klein
On Thu, Feb 17, 2022 at 09:41 AM Thomas Kellerer wrote: Carsten Klein schrieb am 16.02.2022 um 14:27: Ah, man versteht sich :) I'm using several (now unsupported) PostgreSQL 9.3.24 servers on different (ancient) Ubuntu 14.04 LTS machines. On only one of those servers, I get strange/wrong result

Re: Strange results when casting string to double

2022-02-17 Thread Peter J. Holzer
On 2022-02-16 22:02:02 +0100, Carsten Klein wrote: > On of the virtualized servers was created as a clone of the other one (using > VMware to clone the VM). So, basically, these are very equal. Of course, > they diverged over time. > > Focusing on PostgreSQL, here are the differences of postgresql

pgbouncer: Warning xbuf_connect failed: no such or file directory

2022-02-17 Thread Vikas Sharma
Hi There, Could someone shed some light on this error please? I am trying to set up pgbouncer on a postgres Paas instance. Regards Vikas

Re: Strange results when casting string to double

2022-02-17 Thread Carsten Klein
AOn Thu, Feb 17, 2022 at 10:27 AM Peter J. Holzer wrote I don't think these explain the difference. I'd check whether the postgresql binaries and all the the shared libraries are the same. Or - since this only happens on the test system and not on the production system - I'd just clone the p

alter function/procedure depends on extension

2022-02-17 Thread Bryn Llewellyn
*Briefly* qu. 1. What is the use-case for "alter function/procedure depends on extension"? After all, subprograms depend, functionally, on all sorts of things. But (unlike in Oracle Database) there’s (almost) no semantic check at “create” time and therefore nothing like the semantics that ORCL’

Re: alter function/procedure depends on extension

2022-02-17 Thread Adrian Klaver
On 2/17/22 08:52, Bryn Llewellyn wrote: **Briefly** *qu. 2.* Why does "drop extension restrict" quietly succeed—having the effect of cascade-dropping any subprogram that you've altered to depend on the extension in question? This is at odds with the documented meaning of "restrict". But n

Re: alter function/procedure depends on extension

2022-02-17 Thread Alvaro Herrera
On 2022-Feb-17, Bryn Llewellyn wrote: > qu. 1. What is the use-case for "alter function/procedure depends on > extension"? Suppose you have an extension that implements change auditing for tables, which works by creating triggers on the audited tables. You enable auditing for specific tables by

2 phase commit with FDW

2022-02-17 Thread Mladen Gogala
Hi! I am getting the following error when trying to PREPARE transaction which updates both local and foreign table: 2/17/22 12:48:00:657 EST] 0128 RegisteredRes E   WTRN0046E: An attempt by the transaction manager to call prepare on a transactional resource has resulted in an error. The

Re: alter function/procedure depends on extension

2022-02-17 Thread David G. Johnston
On Thu, Feb 17, 2022 at 10:04 AM Adrian Klaver wrote: > On 2/17/22 08:52, Bryn Llewellyn wrote: > > **Briefly** > > > > > *qu. 2.* Why does "drop extension restrict" quietly succeed—having the > > effect of cascade-dropping any subprogram that you've altered to depend > > on the extension in ques

Re: alter function/procedure depends on extension

2022-02-17 Thread David G. Johnston
On Thu, Feb 17, 2022 at 11:15 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > and the documentation for ALTER FUNCTION should read "...as dependent on > an extension may be dropped when the extension is dropped". > Nevermind this - if the extension is dropped the function will go awa

frequency of positive and negative numbers, sizes of numbers and frequency of alteration of polarity

2022-02-17 Thread Shaozhong SHI
How to calculate frequency of positive and negative numbers and define and calculate frequency of alteration of polarity? Surely, we can use frequency of alteration of polarity and level of change (e.g., size of positive and negative numbers) to measure degree and frequency of alteration. Any ide

Question on Open PostgreSQL Monitoring

2022-02-17 Thread Lu, Dan
Hello, I am not sure if this is the right email group to ask about Open PostgreSQL Monitoring (https://opm.readthedocs.io/opm-core/index.html). It appears there is no update to this tool since at least 2019. Since members from this email group has lots of expertise on PostgreSQL, I thought I

Give default privileges to another SuperUser ?

2022-02-17 Thread celati Laurent
Good morning, I'm a superUser. I have defined different roles for several "simple" users. They have rights for read/select/use on any existing table. And also on any table that will be generated in the future (DEFAULT PRIVILEGE). Here is my method: --FOR PUBLIC DIAGRAM > GRANT USAGE ON SCHEMA pu

Re: Give default privileges to another SuperUser ?

2022-02-17 Thread David G. Johnston
On Thu, Feb 17, 2022 at 2:14 PM celati Laurent wrote: > >> ALTER DEFAULT PRIVILEGES IN SCHEMA XXX GRANT SELECT ON TABLES TO "user"; > > > Does a person know how to give privileges to a SuperUser role so that when > he creates a new table, whether in the public schema or another schema, the > tabl

Re: frequency of positive and negative numbers, sizes of numbers and frequency of alteration of polarity

2022-02-17 Thread Thomas Munro
On Fri, Feb 18, 2022 at 9:11 AM Shaozhong SHI wrote: > How to calculate frequency of positive and negative numbers and define and > calculate frequency of alteration of polarity? > > Surely, we can use frequency of alteration of polarity and level of change > (e.g., size of positive and negative

Re: frequency of positive and negative numbers, sizes of numbers and frequency of alteration of polarity

2022-02-17 Thread Shaozhong SHI
On Thursday, 17 February 2022, Thomas Munro wrote: > On Fri, Feb 18, 2022 at 9:11 AM Shaozhong SHI > wrote: > > How to calculate frequency of positive and negative numbers and define > and calculate frequency of alteration of polarity? > > > > Surely, we can use frequency of alteration of polari

Re: frequency of positive and negative numbers, sizes of numbers and frequency of alteration of polarity

2022-02-17 Thread Shaozhong SHI
On Thu, 17 Feb 2022 at 21:20, Thomas Munro wrote: > On Fri, Feb 18, 2022 at 9:11 AM Shaozhong SHI > wrote: > > How to calculate frequency of positive and negative numbers and define > and calculate frequency of alteration of polarity? > > > > Surely, we can use frequency of alteration of polarit

Re: frequency of positive and negative numbers, sizes of numbers and frequency of alteration of polarity

2022-02-17 Thread Thomas Munro
On Fri, Feb 18, 2022 at 10:42 AM Shaozhong SHI wrote: > Given 2 or more such columns, is there any measure that can be calculated to > tell which one alternates more than others? Well, you could report non-flips as NULL and flips as magnitude, and then wrap that query in another query to compute

Re: alter function/procedure depends on extension

2022-02-17 Thread Bryn Llewellyn
> david.g.johns...@gmail.com wrote: > >> david.g.johns...@gmail.com wrote: >> >> …and the documentation for ALTER FUNCTION should read "…as dependent on an >> extension may be dropped when the extension is dropped". > > Nevermind this - if the extension is dropped the function will go away. Bu

Re: alter function/procedure depends on extension

2022-02-17 Thread David G. Johnston
On Thu, Feb 17, 2022 at 5:15 PM Bryn Llewellyn wrote: > > So I don't know what to believe. > Well, since the documentation supports what I was saying but the implementation effectively supports what Adrian was saying this confusion isn't surprising. The status quo is inconsistent and needs to

Re: alter function/procedure depends on extension

2022-02-17 Thread Tom Lane
"David G. Johnston" writes: > Maybe, but the behavior does exist but is bugged in its current state. > Whether it is advisable for users to use this feature is immaterial, the > bug needs to be fixed so that is works as documented for those that choose > to do so. There is no bug here; it's opera

Re: alter function/procedure depends on extension

2022-02-17 Thread David G. Johnston
On Thu, Feb 17, 2022 at 6:17 PM Tom Lane wrote: > "David G. Johnston" writes: > > Maybe, but the behavior does exist but is bugged in its current state. > > Whether it is advisable for users to use this feature is immaterial, the > > bug needs to be fixed so that is works as documented for those

Re: alter function/procedure depends on extension

2022-02-17 Thread David G. Johnston
On Thu, Feb 17, 2022 at 7:30 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Thu, Feb 17, 2022 at 6:17 PM Tom Lane wrote: > >> "David G. Johnston" writes: >> > Maybe, but the behavior does exist but is bugged in its current state. >> > Whether it is advisable for users to use this

Re: alter function/procedure depends on extension

2022-02-17 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Feb 17, 2022 at 6:17 PM Tom Lane wrote: >> There is no bug here; it's operating as designed and documented. >> Maybe the docs need some refinement. > We should just say that ALTER FUNCTION ALTER DEPENDS ON makes the target > function/procedure a (transient?)

Re: alter function/procedure depends on extension

2022-02-17 Thread David G. Johnston
On Thu, Feb 17, 2022 at 8:54 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Thu, Feb 17, 2022 at 6:17 PM Tom Lane wrote: > >> There is no bug here; it's operating as designed and documented. > >> Maybe the docs need some refinement. > > > We should just say that ALTER FUNCTION ALTER DE

Re: Question on Open PostgreSQL Monitoring

2022-02-17 Thread Julien Rouhaud
Hi, On Thu, Feb 17, 2022 at 03:52:54PM +, Lu, Dan wrote: > > I am not sure if this is the right email group to ask about Open PostgreSQL > Monitoring (https://opm.readthedocs.io/opm-core/index.html). The correct place to ask question is one the github repositories, per https://opm.readthedoc