Skip site navigation (1) Skip section navigation (2)

Re: erroneous restore into pg_catalog schema

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Erik Rijkers" <er(at)xs4all(dot)nl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: erroneous restore into pg_catalog schema
Date: 2013-01-13 20:50:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> I think maybe what we should do is have namespace.c retain an explicit
> notion that "the first schema listed in search_path didn't exist", and
> then throw errors if any attempt is made to create objects without an
> explicitly specified namespace.

I don't much like this.

  SET search_path TO dontexist, a, b;

And the table foo is now in a (provided it exists). Your proposal would
break that case, right?  The problem is that the search_path could come
from too many places: postgresql.conf, ALTER ROLE, ALTER DATABASE etc.

And I have seen roles setup with some search_path containing schema that
will only exist in some of the database they can connect to…

Dimitri Fontaine     PostgreSQL : Expertise, Formation et Support

In response to


pgsql-hackers by date

Next:From: Andres FreundDate: 2013-01-13 21:06:37
Subject: Re: [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4)
Previous:From: Hannu KrosingDate: 2013-01-13 20:46:54
Subject: Re: logical changeset generation v3 - comparison to Postgres-R change set format

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group