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

Re: ALTER OBJECT any_name SET SCHEMA name

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER OBJECT any_name SET SCHEMA name
Date: 2010-11-03 16:10:12
Message-ID: m2lj5atml7.fsf@hi-media.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> writes:
> Please find attached v12 of the patch, which implements that idea.

And v13 now. v12 was intended to see what you think about the new
pg_execute_from_file placeholder API and replace_text usage, v13 fixes
the pg_dump support by adding dependencies.

Also, I've been changing the \dx output to show the schema where an
extension's objects are living rather than the custom_variable_classes
that most users won't care about, I think.

Then, I think the ALTER EXTENSION foo SET SCHEMA name still has a use
case, so I've prepared a simple patch to show the API usage before we
get to refactor it all following Tom's asking. So there's a initial
patch to see that in action. I had to rework AlterFunctionNamespace()
API so that I can call it from elsewhere in the backend where I have
Oids, so here's an updated set_schema.4.patch. We will have to extend
the APIs for relations and types the same way, but it's already possible
to test the patch with some extensions this way.

Producing those patches (the alter_extension patch is an incremental
patch that sits atop both the extension and the set_schema one) is made
easy enough with git, I'm impressed by this tool.

  http://git.postgresql.org/gitweb?p=postgresql-extension.git;a=summary

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


Attachment: set_schema.4.patch
Description: text/x-patch (36.5 KB)
Attachment: alter_extension.0.patch
Description: text/x-patch (7.6 KB)
Attachment: extension.v13.patch.gz
Description: application/octet-stream (47.4 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-11-03 16:28:42
Subject: Re: why does plperl cache functions using just a bool for is_trigger
Previous:From: Tom LaneDate: 2010-11-03 14:42:12
Subject: Re: improved parallel make support

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