Re: Help with search_path setting - can't create objects - Mailing list pgsql-novice

From Tom Lane
Subject Re: Help with search_path setting - can't create objects
Date
Msg-id 18687.1439927688@sss.pgh.pa.us
Whole thread Raw
In response to Help with search_path setting - can't create objects  (Eric Raskin <eraskin@paslists.com>)
Responses Re: Help with search_path setting - can't create objects  (Eric Raskin <eraskin@paslists.com>)
List pgsql-novice
Eric Raskin <eraskin@paslists.com> writes:
> When I connect as the user, my search_path looks like this:

> pas=> show search_path;
>     search_path
> -------------------
>  "sbowner, public"
> (1 row)

That's not right ... those quotes shouldn't be there.  (They mean that
you have just one entry in the list, and it is "sbowner, public",
which of course doesn't match anything.)

How did you set that value exactly?

> When I do this, it works:

> pas=> set search_path to sbowner, public;

Yes, that is correct syntax.

> #search_path = '"$user",public'         # schema names

This would be correct too (note the quoting rules in postgresql.conf
are not the same as in SQL).

> Why is this happening?  How do I fix the system search_path so that it
> just "works"?

There is evidently a broken setting of search_path that is overriding the
default.  Perhaps you applied it with ALTER USER SET or ALTER DATABASE SET
or ALTER SYSTEM SET.  Looking into the pg_settings view for the entry
about search_path should tell you where the active setting came from.

            regards, tom lane


pgsql-novice by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: What should I do after a power loss?
Next
From: Eric Raskin
Date:
Subject: Re: Help with search_path setting - can't create objects