From:
Robert Haas <robertmhaas(at)gmail(dot)com>
To:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc:
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, pgsql-hackers(at)postgresql(dot)org, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
Subject:
Re: erroneous restore into pg_catalog schema
Date:
2013-01-15 20:40:02
Message-ID:
CA+TgmoYr=-M0p71TiEJNcT_RZ3L1BWDZXrua21F5gh34zR68EA@mail.gmail.com (view raw or flat )
Thread:
2013-01-13 10:17:31 from "Erik Rijkers" <er(at)xs4all(dot)nl>
2013-01-13 15:53:30 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-13 17:29:08 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-13 20:50:06 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-13 21:09:29 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-13 21:18:15 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-13 21:23:30 from "Erik Rijkers" <er(at)xs4all(dot)nl>
2013-01-13 21:37:53 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-14 15:35:57 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-01-14 16:02:40 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-01-14 16:08:43 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-14 16:55:46 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-01-14 17:28:58 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-14 17:44:21 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-01-14 19:07:29 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-01-15 20:09:38 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-15 20:22:11 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-15 20:40:02 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-29 19:30:16 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-01-29 22:37:49 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-29 23:00:51 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-04-17 14:45:35 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-04-17 18:06:12 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-04-22 15:15:38 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-05-04 19:59:49 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-05-04 20:57:44 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-05-06 14:37:33 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-05-06 14:58:17 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-05-13 19:00:04 from Marko Kreen <markokr(at)gmail(dot)com>
2013-05-14 01:04:06 from Stephen Frost <sfrost(at)snowman(dot)net>
2013-05-14 07:29:38 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2013-05-14 08:49:48 from Marko Kreen <markokr(at)gmail(dot)com>
2013-05-14 10:59:34 from Stephen Frost <sfrost(at)snowman(dot)net>
2013-05-14 11:16:55 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-05-14 12:35:03 from Stephen Frost <sfrost(at)snowman(dot)net>
2013-05-09 15:24:27 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-05-13 08:49:07 from Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
2013-05-13 15:48:44 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-05-13 16:20:54 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-05-13 16:32:08 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-05-13 16:35:13 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-05-13 16:59:47 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-05-13 17:03:33 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-05-13 17:04:52 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-05-13 17:18:28 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-05-13 17:40:57 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-05-13 17:50:32 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-05-13 18:35:47 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-05-13 18:43:55 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-05-13 18:48:52 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-05-13 18:55:01 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-05-13 19:16:17 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-05-13 17:27:34 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-05-13 17:32:24 from Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
2013-01-15 20:04:45 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-13 21:31:45 from Andres Freund <andres(at)anarazel(dot)de>
Lists:
pgsql-hackers
On Tue, Jan 15, 2013 at 3:22 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> Or perhaps there is some other way to make sure that the user "really
>> meant it", like refusing to create in pg_catalog unless the schema
>> name is given explicitly. I kind of like that idea, actually.
>
> That does seem attractive at first glance. Did you have an
> implementation in mind? The idea that comes to mind for me is to hack
> namespace.c, either to prevent activeCreationNamespace from getting set
> to "pg_catalog" in the first place, or to throw error in
> LookupCreationNamespace and friends. I am not sure though if
> LookupCreationNamespace et al ever get called in contexts where no
> immediate object creation is intended (and thus maybe an error wouldn't
> be appropriate).
As far as I can see, the principle place we'd want to hack would be
recomputeNamespacePath(), so that activeCreationNamespace never ends
up pointing to pg_catalog even if that's explicitly listed in
search_path. The places where we actually work out what schema to use
are RangeVarGetCreationNamespace() and
QualifiedNameGetCreationNamespace(), but those don't seem like they'd
need any adjustment, unless perhaps we wish to whack around the "no
schema has been selected to create in" error message in some way.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
In response to
Responses
pgsql-hackers by date
Next :From: Bruce MomjianDate: 2013-01-15 20:42:48
Subject : Re: [PATCH] COPY .. COMPRESSED
Previous :From : Christopher BrowneDate : 2013-01-15 20:37:07
Subject : Re: [PATCH] COPY .. COMPRESSED