System (and DB) upgrade problem.

2021-01-12 Thread W.P.
Hi there, I am upgrading Fedora 24 to (now) 26, PostgreSQL stopped starting (as expected), the message from systemctl was to do "postgresql-setup --upgrade". Did installed the tool, loaunched. But it fails with (attached logs) messages, I am missing some libraries, what should I install?

Re: How to keep format of views source code as entered?

2021-01-12 Thread Alex Williams
Ugh, I wasn't and just tried it, thanks. I've saved comments before on pgadmin and wasn't aware it using a sql statement to save it, I thought it was local to my environment. Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Tuesday, January 12, 2021 4:17 PM, Alban Hertroy

Re: Views and triggers more then one row returned by subquery.

2021-01-12 Thread Tom Lane
"Day, David" writes: > My presumption of views and instead of trigger behavior is that the VIEW > first gets populated with the WHERE filter and then the "DELETE or UPDATE" > operation will fire against each of the rendered view rows. ( ? ) > If this is true then I can't explain the more then on

Views and triggers more then one row returned by subquery.

2021-01-12 Thread Day, David
My presumption of views and instead of trigger behavior is that the VIEW first gets populated with the WHERE filter and then the "DELETE or UPDATE" operation will fire against each of the rendered view rows. ( ? ) If this is true then I can't explain the more then one row returned error. [11-1]

Re: How to keep format of views source code as entered?

2021-01-12 Thread Alban Hertroys
> On 12 Jan 2021, at 20:54, Alex Williams wrote: > > Hi Ingolf, > > For comments in views, I create a unused CTE and put my comments there, e.g. > > WITH v_comments AS ( > SELECT 'this is my comment' AS comment > ) > > Alex You do know about COMMENT ON VIEW v_comments IS ’t

Re: How to keep format of views source code as entered?

2021-01-12 Thread Alex Williams
Hi Ingolf, For comments in views, I create a unused CTE and put my comments there, e.g. WITH v_comments AS ( SELECT 'this is my comment' AS comment ) Alex Sent with [ProtonMail](https://protonmail.com) Secure Email. ‐‐‐ Original Message ‐‐‐ On Thursday, January 7, 2021 11:19 AM, Markho

RE: Compatible compiler with Postgresql C++

2021-01-12 Thread Deepti Sharma S
Hello Team, Could you please reply on below query. Regards, Deepti Sharma PMP(r) & ITIL From: Deepti Sharma S Sent: Tuesday, January 5, 2021 4:31 PM To: 'postgres-disc...@mailman.lmera.ericsson.se' Subject: RE: Compatible compiler with Postgresql C++ Hello Team, Could you please help us i

Re: Define hash partition for certain column values

2021-01-12 Thread Michael Lewis
On Tue, Jan 12, 2021 at 9:37 AM Alban Hertroys wrote: > > > On 12 Jan 2021, at 16:51, Голубева Яна wrote: > > > > Values for the key partitioning column are generated randomly and I > can't predict their distribution between ranges. > > If I just create some ranges I won't have any guarantee tha

Re: Define hash partition for certain column values

2021-01-12 Thread Alban Hertroys
> On 12 Jan 2021, at 16:51, Голубева Яна wrote: > > Values for the key partitioning column are generated randomly and I can't > predict their distribution between ranges. > If I just create some ranges I won't have any guarantee that partitions will > have similar amount of data. It is possib

Re: Define hash partition for certain column values

2021-01-12 Thread Rob Sargent
On 1/12/21 8:51 AM, Голубева Яна wrote: Values for the key partitioning column are generated randomly and I can't predict their distribution between ranges. If I just create some ranges I won't have any guarantee that partitions will have similar amount of data. It is possible that I will hav

Re: Define hash partition for certain column values

2021-01-12 Thread Голубева Яна
Values for the key partitioning column are generated randomly and I can't predict their distribution between ranges.If I just create some ranges I won't have any guarantee that partitions will have similar amount of data. It is possible that I will have 2 or 3 extremely big partitions and a bit of

Re: CASE WHEN idiomatic for functions with side-effect?

2021-01-12 Thread Joel Jacobson
Many thanks Tom and David for clarifying the semantics. /Joel

Re: Define hash partition for certain column values

2021-01-12 Thread Michael Lewis
On Tue, Jan 12, 2021 at 1:21 AM Голубева Яна wrote: > List or range partitioning isn't suitable for my case. > I am using a column of numeric(20) type as a base for partitioning. The > values of the column are generated randomly. > So there will be too many partitions if I use list partitioning a

Re: CASE WHEN idiomatic for functions with side-effect?

2021-01-12 Thread Tom Lane
"Joel Jacobson" writes: > Is it idiomatic and safe to use > SELECT > CASE boolean_expression WHEN TRUE THEN function_with_side_effects() END > in a query to ensure the function_with_side_effects() is only > execute if boolean_expression is true? As long as function_with_side_effects() is proper

Re: CASE WHEN idiomatic for functions with side-effect?

2021-01-12 Thread David G. Johnston
On Tue, Jan 12, 2021 at 1:14 AM Joel Jacobson wrote: > Is it idiomatic and safe to use > > SELECT > CASE boolean_expression WHEN TRUE THEN function_with_side_effects() END > As long as function_with_side_effects() is defined volatile it is forced to be executed at runtime, once per row. That

Re: Define hash partition for certain column values

2021-01-12 Thread Голубева Яна
Thank you for the answer! List or range partitioning isn't suitable for my case.I am using a column of numeric(20) type as a base for partitioning. The values of the column are generated randomly. So there will be too many partitions if I use list partitioning as is. I've tried to use an _expressio

CASE WHEN idiomatic for functions with side-effect?

2021-01-12 Thread Joel Jacobson
Is it idiomatic and safe to use SELECT CASE boolean_expression WHEN TRUE THEN function_with_side_effects() END ... in a query to ensure the function_with_side_effects() is only execute if boolean_expression is true? function_with_side_effects() is known to be a normal function, and not an aggr