postgresql-11

Attribute notation for function call gives error

蹲街弑〆低调 提交于 2019-12-01 23:04:07
Attribute notation function call gives error when current schema is different from one of function. I have created a function CREATE FUNCTION pub.FullName(pub.reps) RETURNS text AS $func$ select ($1.fname || ' ' || $1.lname) $func$ LANGUAGE SQL; I am trying to call the function with attribute notation as described in docs ): select r.fullname from pub.reps r; But get an error message: ERROR: column "fullname" does not exist Query with functional notation works fine: select pub.fullname(r.*) from pub.reps r; Database has been migrated from PostgreSQL 10 with backup/restore. Select version()