Обсуждение: [GENERAL] Does a view not define a composite type?

Поиск
Список
Период
Сортировка

[GENERAL] Does a view not define a composite type?

От
Guyren Howe
Дата:
I have a view: “reporting_helpers.customers_by_state_ranked"

I try to define a function with this signature:

CREATE OR REPLACE FUNCTION reporting.formatted_cust_by_state_bold(c "reporting_helpers.customers_by_state_ranked")
    RETURNS "reporting_helpers.customers_by_state_ranked"

I am told “ERROR: type reporting_helpers.customers_by_state_ranked does not exist

I am confused.

Re: [GENERAL] Does a view not define a composite type?

От
Guyren Howe
Дата:

On Apr 23, 2017, at 10:12 , Guyren Howe <guyren@gmail.com> wrote:

I have a view: “reporting_helpers.customers_by_state_ranked"

I try to define a function with this signature:

CREATE OR REPLACE FUNCTION reporting.formatted_cust_by_state_bold(c "reporting_helpers.customers_by_state_ranked")
    RETURNS "reporting_helpers.customers_by_state_ranked"

I am told “ERROR: type reporting_helpers.customers_by_state_ranked does not exist

I am confused.

nm; it appears that the quotes were mucking things up.

Re: [GENERAL] Does a view not define a composite type?

От
"David G. Johnston"
Дата:
On Sunday, April 23, 2017, Guyren Howe <guyren@gmail.com> wrote:

CREATE OR REPLACE FUNCTION reporting.formatted_cust_by_state_bold(c "reporting_helpers.customers_by_state_ranked")
    RETURNS "reporting_helpers.customers_by_state_ranked"

I am told “ERROR: type reporting_helpers.customers_by_state_ranked does not exist

I am confused.

nm; it appears that the quotes were mucking things up.

For the audience - you don't quote the period separating the schema and object. If you do you just get a single object named that and the search path is used to find it.

David J.