--
--


SELECT pg_catalog.set_config('search_path', '', false);

--
-- Name: upper2(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.upper2(text) RETURNS text
    LANGUAGE sql
    AS $_$SELECT upper($1)$_$;


ALTER FUNCTION public.upper2(text) OWNER TO postgres;

--
-- Name: upper3(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.upper3(text) RETURNS text
    LANGUAGE sql -- IMMUTABLE is optional for indexed SQL functions
-- schema qualifying the call to upper2 works, i.e. public.upper2()
    AS $_$SELECT upper2($1)$_$;

--
-- THIS PL/pgSQL FUNCTION WORKS SINCE IT IS NOT INLINED
--
CREATE FUNCTION public.upper3(text) RETURNS text
    LANGUAGE plpgsql IMMUTABLE
    AS $_$BEGIN
RETURN upper2($1)
END$_$;


ALTER FUNCTION public.upper3(text) OWNER TO postgres;



--
-- Name: test; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.test (
    x text
);


ALTER TABLE public.test OWNER TO postgres;

--
-- Data for Name: test; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.test (x) FROM stdin;
\.


--
-- Name: i_test; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX i_test ON public.test USING btree (public.upper2(x));


--
-- Name: i_test2; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX i_test2 ON public.test USING btree (public.upper3(x));


--
--

