Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Martijn Tonies (Upscene Productions)
On 12/1/22 09:24, Dominique Devienne wrote: > I guess is a DBA-versus-Developer point-of-view difference. --DD What this points to is that there are multiple ways to handle this, many external to the server itself. My take is that the system catalogs are there for the proper operation of the

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread raf
On Thu, Dec 01, 2022 at 04:38:57PM +0100, Dominique Devienne wrote: > On Thu, Dec 1, 2022 at 4:23 PM Tom Lane wrote: > > "David G. Johnston" writes: > > > On Thu, Dec 1, 2022 at 7:59 AM Martijn Tonies (Upscene Productions) < > > > m.ton...@upscene.com> wrote: > > >> Can you modify the server

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Gavan Schneider
On 2 Dec 2022, at 6:51, Tom Lane wrote: > Dominique Devienne writes: >> On Thu, Dec 1, 2022 at 8:09 PM Christophe Pettus wrote: >>> Since this is a custom-built system, there is nothing keeping you from >>> creating your own table in the database that stores the original text of >>> the

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Tom Lane
Dominique Devienne writes: > On Thu, Dec 1, 2022 at 8:09 PM Christophe Pettus wrote: >> Since this is a custom-built system, there is nothing keeping you from >> creating your own table in the database that stores the original text of the >> function. > That's not the point. If a DBA updates

Re: how to secure pg_hba.conf

2022-12-01 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Dec 1, 2022 at 11:36 AM Rizwan Shaukat > wrote: >> we hv requiremnt from security to secure pg_hba.conf file was encryption >> or password protected on server to protect ip visibilty because these >> server access by application n thy can amend as well. how

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Dominique Devienne
On Thu, Dec 1, 2022 at 8:09 PM Christophe Pettus wrote: > > On Dec 1, 2022, at 11:05, Dominique Devienne wrote: > > I see. Still, Oracle preserves SQL as-is. SQLite preserve SQL as-is. > > Would be nice if PostgreSQL did too. That's all I'm saying. > > Since this is a custom-built system, there

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Christophe Pettus
> On Dec 1, 2022, at 11:05, Dominique Devienne wrote: > > I see. Still, Oracle preserves SQL as-is. SQLite preserve SQL as-is. > Would be nice if PostgreSQL did too. That's all I'm saying. Since this is a custom-built system, there is nothing keeping you from creating your own table in the

Re: how to secure pg_hba.conf

2022-12-01 Thread David G. Johnston
On Thu, Dec 1, 2022 at 11:36 AM Rizwan Shaukat wrote: > we hv requiremnt from security to secure pg_hba.conf file was encryption > or password protected on server to protect ip visibilty because these > server access by application n thy can amend as well. how we can achive it > pls > > You

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Dominique Devienne
On Thu, Dec 1, 2022 at 6:41 PM Adrian Klaver wrote: > On 12/1/22 09:24, Dominique Devienne wrote: > > I guess is a DBA-versus-Developer point-of-view difference. --DD > > What this points to is that there are multiple ways to handle this, many > external to the server itself. My take is that the

Re: how to secure pg_hba.conf

2022-12-01 Thread Ron
On 12/1/22 07:45, Rizwan Shaukat wrote: Hi, we hv requiremnt from security to secure pg_hba.conf file was encryption or password protected on server to protect ip visibilty because these server access by application n thy can amend as well. how we can achive it pls pg_hba.conf should only

Re: how to secure pg_hba.conf

2022-12-01 Thread Christophe Pettus
> On Dec 1, 2022, at 05:45, Rizwan Shaukat wrote: > we hv requiremnt from security to secure pg_hba.conf file was encryption or > password protected on server to protect ip visibilty because these server > access by application n thy can amend as well. how we can achive it pls The only

how to secure pg_hba.conf

2022-12-01 Thread Rizwan Shaukat
Hi, we hv requiremnt from security to secure pg_hba.conf file was encryption or password protected on server to protect ip visibilty because these server access by application n thy can amend as well. how we can achive it pls Rizwan

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Adrian Klaver
On 12/1/22 09:24, Dominique Devienne wrote: On Thu, Dec 1, 2022 at 5:10 PM Laurenz Albe wrote: On Thu, 2022-12-01 at 16:38 +0100, Dominique Devienne wrote: FWIW, we have a custom schema introspection and diff'ing ad-hoc framework, This is arguable, but my opinion is that this is not a

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Dominique Devienne
On Thu, Dec 1, 2022 at 5:10 PM Laurenz Albe wrote: > On Thu, 2022-12-01 at 16:38 +0100, Dominique Devienne wrote: > > FWIW, we have a custom schema introspection and diff'ing ad-hoc framework, > > This is arguable, but my opinion is that this is not a robust way to > do development. You should

Re: postgres large database backup

2022-12-01 Thread Michael Loftis
On Thu, Dec 1, 2022 at 9:21 AM Michael Loftis wrote: > > > > On Thu, Dec 1, 2022 at 06:40 Mladen Gogala wrote: >> >> On 11/30/22 20:41, Michael Loftis wrote: >> >> >> ZFS snapshots don’t typically have much if any performance impact versus >> not having a snapshot (and already being on ZFS)

Re: postgres large database backup

2022-12-01 Thread Michael Loftis
On Thu, Dec 1, 2022 at 06:40 Mladen Gogala wrote: > On 11/30/22 20:41, Michael Loftis wrote: > > > ZFS snapshots don’t typically have much if any performance impact versus > not having a snapshot (and already being on ZFS) because it’s already doing > COW style semantics. > > Hi Michael, > > I

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Laurenz Albe
On Thu, 2022-12-01 at 16:38 +0100, Dominique Devienne wrote: > FWIW, we have a custom schema introspection and diff'ing ad-hoc framework, > and the fact the original SQL is not conserved as-is has also created > issues for us. > > On Oracle, our SQL was preserved as-is, so could be compared

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Martijn Tonies (Upscene Productions)
On Thu, Dec 1, 2022 at 7:59 AM Martijn Tonies (Upscene Productions) wrote: Since version 14, the source code for a stored procedure or function written in plain (compound) SQL, a new feature, is no longer stored in pg_proc.prosrc, instead, there’s an additional column prosqlbody which

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Dominique Devienne
On Thu, Dec 1, 2022 at 4:23 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Thu, Dec 1, 2022 at 7:59 AM Martijn Tonies (Upscene Productions) < > > m.ton...@upscene.com> wrote: > >> Can you modify the server code to store the original body in proc.prosrc > >> again? It would be very

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Dec 1, 2022 at 7:59 AM Martijn Tonies (Upscene Productions) < > m.ton...@upscene.com> wrote: >> Can you modify the server code to store the original body in proc.prosrc >> again? It would be very helpful. > I seem to recall that this option had been

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread David G. Johnston
On Thu, Dec 1, 2022 at 7:59 AM Martijn Tonies (Upscene Productions) < m.ton...@upscene.com> wrote: > > Since version 14, the source code for a stored procedure or function > written > in plain (compound) SQL, a new feature, is no longer stored in > pg_proc.prosrc, instead, there’s an additional

Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-01 Thread Martijn Tonies (Upscene Productions)
Hi all, In PosgreSQL version 13, the source code for a stored procedure or function in SQL/plpgsql/etc was stored in pg_proc.prosrc. This column would hold the original procedure or function body, verbatim. Since version 14, the source code for a stored procedure or function written in

Re: postgres large database backup

2022-12-01 Thread Vijaykumar Jain
> I do not recall zfs snapshots took anything resource intensive, and it > was quick.ill ask around for actual time. > Ok just a small note, out ingestion pattern is write anywhere, read globally. So we did stop ingestion while snapshot was taken as we could afford it that way. Maybe the story

Re: Finding free time period on non-continous tstzrange field values

2022-12-01 Thread Tom Lane
Amitabh Kant writes: > I tried the following query : > SELECT tstzmultirange(tstzrange('2022-11-25 00:00:00', '2022-11-30 > 00:00:00', '[]')) - > range_agg(time_range) AS availability > FROM test_time_range > WHERE time_range && tstzrange('2022-11-25 00:00:00', '2022-11-30 00:00:00', > '[]');

Re: postgres large database backup

2022-12-01 Thread Vijaykumar Jain
On Thu, Dec 1, 2022, 7:11 PM Mladen Gogala wrote: > On 11/30/22 20:41, Michael Loftis wrote: > > > ZFS snapshots don’t typically have much if any performance impact versus > not having a snapshot (and already being on ZFS) because it’s already doing > COW style semantics. > > Hi Michael, > > I

Re: postgres large database backup

2022-12-01 Thread Mladen Gogala
On 11/30/22 20:51, Ron wrote: ZFS will yes be slower than a raw disk (but that’s not an option for Pg anyway), and may or may not be faster than a different  filesystem on a HW RAID volume or storage array volume. It absolutely takes more care/clue/tuning to get Pg write performance on ZFS,

Re: postgres large database backup

2022-12-01 Thread Mladen Gogala
On 11/30/22 20:41, Michael Loftis wrote: ZFS snapshots don’t typically have much if  any performance impact versus not having a snapshot (and already being on ZFS) because it’s already doing COW style semantics. Hi Michael, I am not sure that such statement holds water. When a snapshot is

Re: posgres question / answer

2022-12-01 Thread Ray O'Donnell
On 30/11/2022 22:39, Rizwan Shaukat wrote: Hi Team, im new to postgres, trying to learn postgres n i hv many questions in my mind, need to discuss in community, pls add access for questions. Hi there, This is a mailing list - emails to it go to everyone on the list. Ask away! Ray. --

posgres question / answer

2022-12-01 Thread Rizwan Shaukat
Hi Team, im new to postgres, trying to learn postgres n i hv many questions in my mind, need to discuss in community, pls add access for questions. Rizwan

Re: postgresql 13.1: precision of spatial operations

2022-12-01 Thread Вадим Самохин
ср, 30 нояб. 2022 г., 20:51 Brad White : > On 11/30/2022 9:48 AM, Вадим Самохин wrote: > > > Thank you so much Ivan, it worked! > Can you give any more detail on which approach you took, for the sake of > future followers? > Sure, I multiplied all points' coordinates by a factor of 10^6. Here