Re: search_path for PL/pgSQL functions partially cached?

2025-01-04 Thread David G. Johnston
On Saturday, January 4, 2025, Jan Behrens wrote: > > I re-read section 41.11.2. on Plan Caching: > > "The PL/pgSQL interpreter parses the function's source text and > produces an internal binary instruction tree the first time the > function is called (within each session). The instruction tree f

Re: search_path for PL/pgSQL functions partially cached?

2025-01-04 Thread David G. Johnston
On Saturday, January 4, 2025, Jan Behrens wrote: > > CREATE FUNCTION "foo_impl"("query_p" TEXT, "search_path_p" TEXT) > RETURNS "some_type" > LANGUAGE plpgsql SET search_path FROM CURRENT AS $$ > DECLARE > "old_search_path" TEXT; > "result" "some_type"; > BEGIN > "ol

Re: search_path for PL/pgSQL functions partially cached?

2025-01-04 Thread David G. Johnston
On Saturday, January 4, 2025, Jan Behrens wrote: > > > Even if > > DECLARE "variable" "tbl"."col"%TYPE; > > follows *after* the schema is set to "myschema" in the example above, I > still get differing results, depending on how the search_path was set > when the function was first called. > > I th

Re: search_path for PL/pgSQL functions partially cached?

2025-01-04 Thread Jan Behrens
On Sat, 4 Jan 2025 09:37:14 -0800 Adrian Klaver wrote: > On 1/3/25 15:22, Jan Behrens wrote: > > On Fri, 3 Jan 2025 13:56:02 -0800 > > Adrian Klaver wrote: > > > >> At this point I am lost as to what the overall goal of this is. > >> > >> Can you provide a 1 ft view if what it is you are tr

Re: name difference of rpm packages of postgresql-private-devel-16.6.z

2025-01-04 Thread Laurenz Albe
On Mon, 2024-12-30 at 16:53 +0530, Ravi Dave wrote: > Out of curiosity, I wanted to know the meaning of "private" in  > postgresql-private-devel-16.6. > rpm package name. Ideally, I saw postgresql-devel-* rpm packages, so I want > to know if there > is any specific reason for he word private in th

Re: Unexpected results from a query with UNION ALL

2025-01-04 Thread Tom Lane
Andrey writes: > Recently I got unexpected results from a query that seems to be legit. > ... > ... Once I commit the concurrent query and > release the lock, I get this: > -- result 2 >child_id > -- > 5cb82ceb-c5ef-4c59-a02e-f7b610470f8c > 5c

Re: search_path for PL/pgSQL functions partially cached?

2025-01-04 Thread Adrian Klaver
On 1/3/25 15:22, Jan Behrens wrote: On Fri, 3 Jan 2025 13:56:02 -0800 Adrian Klaver wrote: At this point I am lost as to what the overall goal of this is. Can you provide a 1 ft view if what it is you are trying to achieve? Sure! I would like to create a component (e.g. a PostgreSQL ext

Re: To uninstall or not to uninstall that is...

2025-01-04 Thread Adrian Klaver
On 1/4/25 03:08, Arbol One wrote: Hello. In my Debian 12 machine, I have PostgreSQL-15 installed; I'd like to upgrade to PostgreSQL-16. Should I first uninstalled PostgreSQL-15 and then install PostgreSQL-16 or is there a way to just do an upgrade? Do you want to run both versions concurrentl

name difference of rpm packages of postgresql-private-devel-16.6.z

2025-01-04 Thread Ravi Dave
Hello, Out of curiosity, I wanted to know the meaning of "private" in postgresql-private-devel-16.6. rpm package name. Ideally, I saw postgresql-devel-* rpm packages, so I want to know if there is any specific reason for he word private in the name of rpm. -- Regards, Ravi Dave

Unexpected results from a query with UNION ALL

2025-01-04 Thread Andrey
Hi everyone, Recently I got unexpected results from a query that seems to be legit. The setup is like this: -- setup CREATE TABLE parents ( id uuidnot null primary key, revision integer not null ); CREATE TABLE children ( iduuidnot null primary key, parent_id

Re: search_path for PL/pgSQL functions partially cached?

2025-01-04 Thread Jan Behrens
On Fri, 3 Jan 2025 18:36:13 -0500 Isaac Morland wrote: > On Fri, 3 Jan 2025 at 18:22, Jan Behrens wrote: > > > > Instead, I plan to expect the function to receive a query string that > > will get the data that is being processed by the function. > > > > That query string should be allowed to r

Re: To uninstall or not to uninstall that is...

2025-01-04 Thread sivapostg...@yahoo.com
I've installed PostgreSQL 12 and PostgreSQL 15 side-by-side in my Ubuntu Linux.  Both works fine till date.   On Saturday 4 January, 2025 at 04:39:30 pm IST, Arbol One wrote: Hello. In my Debian 12 machine, I have PostgreSQL-15 installed; I'd like to upgrade to PostgreSQL-16. Shou

Re: To uninstall or not to uninstall that is...

2025-01-04 Thread Peter J. Holzer
On 2025-01-04 06:08:58 -0500, Arbol One wrote: > In my Debian 12 machine, I have PostgreSQL-15 installed; I'd like to upgrade > to > PostgreSQL-16. Should I first uninstalled PostgreSQL-15 and then install > PostgreSQL-16 or is there a way to just do an upgrade? How did you install it? Package fr

To uninstall or not to uninstall that is...

2025-01-04 Thread Arbol One
Hello. In my Debian 12 machine, I have PostgreSQL-15 installed; I'd like to upgrade to PostgreSQL-16. Should I first uninstalled PostgreSQL-15 and then install PostgreSQL-16 or is there a way to just do an upgrade? Thanks. -- */ArbolOne ™/* Using Fire Fox and Thunderbird. ArbolOne is composed