Re: Fw: Priority against catalog

Started by Greg Copelandabout 23 years ago2 messagesgeneral
Jump to latest
#1Greg Copeland
greg@CopelandConsulting.Net

Change the name of your function.

Regards,

Greg

On Tue, 2003-02-11 at 11:35, Cristian Custodio wrote:

Thanks for your answer, but I already did this.

Don't you would have another sugestion?

Cristian

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Cristian Custodio" <crstian@terra.com.br>
Cc: <pgsql-general@postgresql.org>
Sent: Tuesday, February 11, 2003 12:26 PM
Subject: Re: [GENERAL] Priority against catalog

"Cristian Custodio" <crstian@terra.com.br> writes:

I created a function called Version(),
The same that there is in PostGreSQL Catalog.

But, to call this function I'm obrigated to=20
specific the SCHEMA.Version. I would like it
execute my functions when I don't to specific=20=20
the SCHEMA.

Change the SEARCH_PATH setting so your schema is in front of
pg_catalog.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
Greg Copeland <greg@copelandconsulting.net>
Copeland Computer Consulting

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Greg Copeland (#1)

"Cristian Custodio" <crstian@terra.com.br> writes:

Thanks for your answer, but I already did this.
Don't you would have another sugestion?

It works for me, what are you doing differently?

regression=# create schema myschema;
CREATE SCHEMA
regression=# create function myschema.version() returns text as '
regression'# select ''hello there''::text;' language sql;
CREATE FUNCTION
regression=# select version();
version
------------------------------------------------------------------
PostgreSQL 7.4devel on hppa-hp-hpux10.20, compiled by GCC 2.95.3
(1 row)

regression=# set search_path = myschema, pg_catalog;
SET
regression=# select version();
version
-------------
hello there
(1 row)

regression=#

Try looking at "show search_path" and "select current_schemas(true)"
to see what's going on.

regards, tom lane