Function inside query status

2022-06-29 Thread Rama Krishnan
Hi All, Is it possible to check the query execution status inside the function. created or replace function data_purge() returns void as$$ Declare Begin Drop table test_old; Create table test_old as select * from sales where bill_date

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-29 Thread David G. Johnston
On Wed, Jun 29, 2022 at 5:03 PM Bryn Llewellyn wrote: > > *Meanwhile. I'll appeal for some pointers to what I should read:* > I *had* understood that the SQL that a user-created subprogram issues (at > least for "language sql" and "language plpgsql") is implicitly prepared. > But I've no idea wha

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-29 Thread Bryn Llewellyn
> david.g.johns...@gmail.com wrote: > >> b...@yugabyte.com wrote: >> >> When I drop the first link, f1() in the chain of "immutable" functions, I >> see that I cannot invoke f(2) because it now complains that f1() doesn't >> exist. This surprises me because, after all, the result of f2() is now

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-29 Thread David G. Johnston
On Wednesday, June 29, 2022, Bryn Llewellyn wrote: > > When I drop the first link, f1() in the chain of "immutable" functions, I > see that I cannot invoke f(2) because it now complains that f1() doesn't > exist. This surprises me because, after all, the result of f2() is now > cached (at least a

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-29 Thread Bryn Llewellyn
> x...@thebuild.com wrote: > > I think "not allowed" is putting it too strongly. It would be a bit much to > ask that every single user-written immutable function be 100% perfect when it > is rolled out, and never have to fix any bugs in them. However, you > definitely *do* have to understand t

Question on pg_auto_failover extension

2022-06-29 Thread DAN LU
Hello, I ran into issue with creating the monitor server using the pg_auto_failover extension. I outlined the issue here: https://github.com/citusdata/pg_auto_failover/issues/912 Any feedback or help is greatly appreciated.

RE: help for pg_wal issue

2022-06-29 Thread Özge Özyavuz
Thanks a lot for your reply! We used netbackup for postgresql backups. From what I saw on pgadmin tool backup user first issue this command, SELECT pg_start_backup('label',true) Then tool copy the postgresql directory and its files. Then it executed this command. SELECT pg_stop_backup() what

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-29 Thread Christophe Pettus
> On Jun 28, 2022, at 23:42, Laurenz Albe wrote: > That is not enough in the general case. You are not allowed to redefine > an IMMUTABLE function in a way that changes its behavior [...] I think "not allowed" is putting it too strongly. It would be a bit much to ask that every single user-

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-29 Thread Pavel Stehule
st 29. 6. 2022 v 8:29 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > st 29. 6. 2022 v 7:46 odesílatel Tom Lane napsal: > >> ... that result has discouraged most people from spending much > >> time on mechanically checking such things. If you declare a function > >> immutable, Postgres