Re: Declaring a field that is also an out parameter in a function

2024-07-06 Thread Tom Lane
Michael Nolan writes: > Shouldn't declaring a field that is also an OUT parameter throw an error? No. The DECLARE is a block nested within the function, and the parameter is declared at function scope. So this is a standard case of an inner declaration masking an outer one. Possibly plpgsql_che

Declaring a field that is also an out parameter in a function

2024-07-06 Thread Michael Nolan
In the following short code, the out parameter d3 is also declared, so its value will be null in the output. create or replace function public.test_function(in varchar, in char, in date, ou t d1 text, out d2 integer, out d3 char, out d4 date ) stable as $$ DECLARE wk_intxt alias for $1; wk

Re: Load a csv or a avro?

2024-07-06 Thread Ron Johnson
On Sat, Jul 6, 2024 at 4:10 PM sud wrote: > On Fri, Jul 5, 2024 at 8:24 PM Adrian Klaver > wrote: > >> On 7/5/24 02:08, sud wrote: >> > Hello all, >> > >> > Its postgres database. We have option of getting files in csv and/or in >> > avro format messages from another system to load it into our p

Re: Load a csv or a avro?

2024-07-06 Thread sud
On Fri, Jul 5, 2024 at 8:24 PM Adrian Klaver wrote: > On 7/5/24 02:08, sud wrote: > > Hello all, > > > > Its postgres database. We have option of getting files in csv and/or in > > avro format messages from another system to load it into our postgres > > database. The volume will be 300million me

Re: Load a csv or a avro?

2024-07-06 Thread sud
On Fri, Jul 5, 2024 at 3:27 PM Kashif Zeeshan wrote: > Hi > > There are different data formats available, following are few points for > there performance implications > > 1. CSV : It's easy to use and widely supported but it can be slower due to > parsing overload. > 2. Binary : Its faster to lo

Re: Can a long running procedure detect when smart shutdown is pending?

2024-07-06 Thread Dennis White
Thanks everyone. A more direct way to check via a sql function would be better but I suppose the dblink extension method will work. Thanks again, Dennis On Sat, Jul 6, 2024 at 9:38 AM Tom Lane wrote: > Laurenz Albe writes: > > On Fri, 2024-07-05 at 14:12 -0400, Dennis White wrote: > >> My proj

Re: Alignment check

2024-07-06 Thread Michael Nolan
I don't have any direct experience with Yugabyte (the databases I work with are way too small to be on Yugabyte) but my older son does work for them as an SRE, sometimes remotely when he's visiting us, so we've talked about it a bit. (It's actually the first time in 20 years I've had much of a clu

Re: Can a long running procedure detect when smart shutdown is pending?

2024-07-06 Thread Tom Lane
Laurenz Albe writes: > On Fri, 2024-07-05 at 14:12 -0400, Dennis White wrote: >> My project's DB has a mutli-step stored procedure using Transaction Control >> that may take 30 minutes or more to complete. >> I am curious if there is a way to make it more smart shutdown friendly so it >> can sto

Re: confused about material view locks please explain

2024-07-06 Thread Peter J. Holzer
On 2024-07-06 11:09:23 +0530, Krishnakant Mane wrote: > > On 7/5/24 21:10, Peter J. Holzer wrote: > > If I understand https://github.com/sraoss/pg_ivm correctly, the > > materialized view will be updated within the same transaction. So it's > > just the same as any other change in the database: >

Re: Can a long running procedure detect when smart shutdown is pending?

2024-07-06 Thread Achilleas Mantzios
Στις 6/7/24 09:22, ο/η Pavel Stehule έγραψε: so 6. 7. 2024 v 8:19 odesílatel Pavel Stehule napsal: so 6. 7. 2024 v 8:06 odesílatel Achilleas Mantzios napsal: Στις 6/7/24 08:39, ο/η Pavel Stehule έγραψε: so 6. 7. 2024 v 1:36 odesílatel Dennis White nap