Re: Array vs Temporary table vs Normal Table + truncate at end

2023-09-04 Thread Laurenz Albe
On Mon, 2023-09-04 at 18:42 +0200, Lorusso Domenico wrote: > I prepared a function that build a set of records of type (myComplexType). > > That works, but I've to use this record set in different situations. > > One of them require to scan multiple times the function results: >    1. comparing w

Re: createuser unexpectedly creates superuser with createdb and createrole

2023-09-04 Thread Laurenz Albe
On Tue, 2023-09-05 at 00:03 +0200, Erik Wienhold wrote: > On 04/09/2023 03:42 CEST Tom Lane wrote: > > I think the last hunk of this is plenty sufficient, and the earlier > > ones just add noise. > > Done. Looks good to me. Yours, Laurenz Albe

Re: createuser unexpectedly creates superuser with createdb and createrole

2023-09-04 Thread Erik Wienhold
On 04/09/2023 03:42 CEST Tom Lane wrote: > I think the last hunk of this is plenty sufficient, and the earlier > ones just add noise. Done. -- ErikFrom 7728fcab53c8e06c781f7347532cc8619799d8ff Mon Sep 17 00:00:00 2001 From: Erik Wienhold Date: Mon, 4 Sep 2023 23:50:33 +0200 Subject: [PATCH v2]

Re: rollback to savepoint issue

2023-09-04 Thread David G. Johnston
On Monday, September 4, 2023, Erik Wienhold wrote: > On 04/09/2023 11:51 CEST Lorusso Domenico wrote: > > > I can't use the savepoint and rollback to savepoint clause. > > I've found some similar problems around on the web, but I can't catch the > > good way to proceed. > > > > What I'm trying t

Array vs Temporary table vs Normal Table + truncate at end

2023-09-04 Thread Lorusso Domenico
Hello guys, I prepared a function that build a set of records of type (myComplexType). That works, but I've to use this record set in different situations. One of them require to scan multiple times the function results: 1. comparing with another table (myProducteAttributeTable) to determine

Re: rollback to savepoint issue

2023-09-04 Thread Dominique Devienne
On Mon, Sep 4, 2023 at 4:22 PM Dominique Devienne wrote: > On Mon, Sep 4, 2023 at 3:47 PM Erik Wienhold wrote: > >> On 04/09/2023 11:51 CEST Lorusso Domenico wrote: >> Transaction control is not possible in functions. Only in procedures >> (CALL) >> and DO blocks. >> >> > ERROR: syntax error a

Re: rollback to savepoint issue

2023-09-04 Thread Erik Wienhold
On 04/09/2023 16:56 CEST David G. Johnston wrote: > On Monday, September 4, 2023, Erik Wienhold wrote: > > > On 04/09/2023 11:51 CEST Lorusso Domenico wrote: > > > > > The original code in embedded in a function, but the problem is the same: > > > > Transaction control is not possible in func

Re: rollback to savepoint issue

2023-09-04 Thread Adrian Klaver
On 9/4/23 07:56, David G. Johnston wrote: On Monday, September 4, 2023, Erik Wienhold > wrote: On 04/09/2023 11:51 CEST Lorusso Domenico mailto:domenico@gmail.com>> wrote: > I can't use the savepoint and rollback to savepoint clause. > I've found some si

Re: rollback to savepoint issue

2023-09-04 Thread Tom Lane
Dominique Devienne writes: > Hi Erik. And experts at large. What's the underlying mechanism though? An > implicit SAVEPOINT? Yes, savepoints and plpgsql exception blocks are built on the same "subtransaction" infrastructure. > Which means extra explicit round-trips to the server to establish and

Re: [EXTERNAL] Oracle FDW version

2023-09-04 Thread Adam Lee
That warning is misleading while creating extensions. Check the runtime linking of oracle_fdw.so, probably some dependencies are missing. Greenplum failed to detect such issues and errored out at a wrong place. Since it’s an issue only happens on Greenplum, please continue the discussion off th

Re: rollback to savepoint issue

2023-09-04 Thread Dominique Devienne
On Mon, Sep 4, 2023 at 3:47 PM Erik Wienhold wrote: > On 04/09/2023 11:51 CEST Lorusso Domenico wrote: > Transaction control is not possible in functions. Only in procedures > (CALL) > and DO blocks. > > > ERROR: syntax error at or near "to" > > LINE 41: rollback to savepoint deleteAttribute; >

Re: rollback to savepoint issue

2023-09-04 Thread Erik Wienhold
On 04/09/2023 11:51 CEST Lorusso Domenico wrote: > I can't use the savepoint and rollback to savepoint clause. > I've found some similar problems around on the web, but I can't catch the > good way to proceed. > > What I'm trying to do is: > * compare new set of attribute with older > * if so

rollback to savepoint issue

2023-09-04 Thread Lorusso Domenico
Hello guys, I can't use the savepoint and rollback to savepoint clause. I've found some similar problems around on the web, but I can't catch the good way to proceed. What I'm trying to do is: - compare new set of attribute with older - if some attributes are part of old set and not in the

Re: Question on Partition key

2023-09-04 Thread David Rowley
On Sun, 3 Sept 2023 at 23:52, veem v wrote: > Additionally, is it true that optimizer will also get fooled on getting the > math correct during cardinality estimates, as because there is a big > difference between , comparing or substracting, two date values VS two number > values. And storing