Re: pPL/pgSQL restriction on characters for copying types? - Mailing list pgsql-general

From Thiemo Kellner
Subject Re: pPL/pgSQL restriction on characters for copying types?
Date
Msg-id e928b61b-7bc6-4f9b-bfad-c3bf2d1a7958@gelassene-pferde.biz
Whole thread Raw
In response to Re: pPL/pgSQL restriction on characters for copying types?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pPL/pgSQL restriction on characters for copying types?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: pPL/pgSQL restriction on characters for copying types?  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
List pgsql-general
Thanks for the hint and care. The install script has a set statement 
already and I now added the search_path clause to no avail. Please find 
the entire code attached and a screenshot from the error.

Am 26.02.2024 um 17:35 schrieb Tom Lane:
> Thiemo Kellner <thiemo@gelassene-pferde.biz> writes:
>> However, I want to create a (trigger) function to impose data
>> consistency. For that purpose, I try to copy the data type of a PL/pgSQL
>> variable from the base object, a view in that case. Trying so, I get the
>> following error on installation of the function.
> 
>> V⠒NODE_TYPE⠒NAME                NODE⠒V.NODE_TYPE⠒NAME%type := null;
> 
>> Syntax error at "%" … invalid type name. If I use the actual type of the
>> column, all is fine.
> 
> FWIW, I couldn't reproduce this with the fragmentary scripts you
> provided.  I suspect the problem is not about the special characters
> in the names, rather about search_path not including the NODE⠒V view.
> Consider schema-qualifying the view name, or attaching a "SET
> search_path" clause to the function.
> 
>             regards, tom lane
Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Clarity regarding the procedures call in postgresql for public and non-public schema
Next
From: Adrian Klaver
Date:
Subject: Re: pPL/pgSQL restriction on characters for copying types?