Re: [GENERAL] Make "(composite).function_name" syntax work without search_path changes? - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Make "(composite).function_name" syntax work without search_path changes?
Date
Msg-id 13482.1509405711@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] Make "(composite).function_name" syntax work without search_path changes?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> The system knows that the datatype being inspected is "altschema.alttype" -
> would it be reasonable for the system to check for a function named "label"
> in the same schema as the target type, "altschema", with the target
> argument type and invoke it if present?

The rule is that (v).label is equivalent to label(v), therefore it will
only find function "label" if that's in your search path.  I am very
much not excited about randomly enlarging the search path depending on
syntax --- quite aside from the difficulty of documenting it clearly,
that seems like a great recipe for security hazards.
        regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: [GENERAL] query not scaling
Next
From: "David G. Johnston"
Date:
Subject: [GENERAL] From the "SQL is verbose" department, WINDOW RANGE specifications