| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: pPL/pgSQL restriction on characters for copying types? |
| Date: | 2024-02-26 16:35:37 |
| Message-ID: | 1812333.1708965337@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Thiemo Kellner <thiemo(at)gelassene-pferde(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2024-02-26 16:39:11 | Re: Clarity regarding the procedures call in postgresql for public and non-public schema |
| Previous Message | Adrian Klaver | 2024-02-26 16:24:34 | Re: Clarity regarding the procedures call in postgresql for public and non-public schema |