setting contrib lo visible to all schemas

Started by Teddy Limousinalmost 16 years ago4 messagesgeneral
Jump to latest
#1Teddy Limousin
mongaru007@gmail.com

hello I`m trying to restore a database that uses contrib type lo. The
database uses one schema where the relations are created
before restoring the schema I execute the command

psql -d dbname -f path-to-contrib/lo.sql

after this I restore the schema and then the data of the database

the problems comes up when trying to make an update to the database schema
from a delphi application
the table has a column of type lo and when trying to update the table I got
the error saying
that lo type does not exist.

I guess this is because when executing the sql command to install lo, it
makes it visible from the public schema only
not from the schema I`m using. So my question is how can I make lo type to
be visible from all schemas

by visible I mean accesible: not need to use for example public.lo to define
a field of type lo

thanks in advanced

--
Teddy L.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Teddy Limousin (#1)
Re: setting contrib lo visible to all schemas

Teddy Limousin <mongaru007@gmail.com> writes:

I guess this is because when executing the sql command to install lo, it
makes it visible from the public schema only
not from the schema I`m using. So my question is how can I make lo type to
be visible from all schemas

by visible I mean accesible: not need to use for example public.lo to define
a field of type lo

It sounds like you removed the public schema from your search_path
setting. Don't do that ...

regards, tom lane

#3Teddy Limousin
mongaru007@gmail.com
In reply to: Tom Lane (#2)
Re: setting contrib lo visible to all schemas

thanks tom, aparently your rigth in the sql dump file there are some
set search_path changes
I tried the set search_path command and use the same query that generate
the error and it works on my pgadmin editor.

My question is how can I set the search_path for all users or all conections
so my application will find the lo type.

thanks

2010/5/20 Tom Lane <tgl@sss.pgh.pa.us>

Teddy Limousin <mongaru007@gmail.com> writes:

I guess this is because when executing the sql command to install lo, it
makes it visible from the public schema only
not from the schema I`m using. So my question is how can I make lo type

to

be visible from all schemas

by visible I mean accesible: not need to use for example public.lo to

define

a field of type lo

It sounds like you removed the public schema from your search_path
setting. Don't do that ...

regards, tom lane

--
Teddy Limousin

#4Gurjeet Singh
singh.gurjeet@gmail.com
In reply to: Teddy Limousin (#3)
Re: setting contrib lo visible to all schemas

On Thu, May 20, 2010 at 11:16 AM, Teddy Limousin <mongaru007@gmail.com>wrote:

thanks tom, aparently your rigth in the sql dump file there are some
set search_path changes
I tried the set search_path command and use the same query that generate
the error and it works on my pgadmin editor.

My question is how can I set the search_path for all users or all
conections
so my application will find the lo type.

You can use the ALTER DATABASE dbname SET search_path = ...
or can do it for individual user as: ALTR USER uname SET search_path = ...

thanks

2010/5/20 Tom Lane <tgl@sss.pgh.pa.us>

Teddy Limousin <mongaru007@gmail.com> writes:

I guess this is because when executing the sql command to install lo, it
makes it visible from the public schema only
not from the schema I`m using. So my question is how can I make lo type

to

be visible from all schemas

by visible I mean accesible: not need to use for example public.lo to

define

a field of type lo

It sounds like you removed the public schema from your search_path
setting. Don't do that ...

regards, tom lane

--
Teddy Limousin

--
gurjeet.singh
@ EnterpriseDB - The Enterprise Postgres Company
http://www.enterprisedb.com

singh.gurjeet@{ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device