Re: CREATE SCHEMA IF NOT EXISTS

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
Subject: Re: CREATE SCHEMA IF NOT EXISTS
Date: 2012-08-17 21:22:16
Message-ID: CAFcNs+qmQGnvV4e6R3UXyrN9Y4jcnFmno3yJLJ2XBEMgmk4j8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2012/8/17 Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>

> Excerpts from Dickson S. Guedes's message of vie ago 17 10:37:25 -0400
> 2012:
> > 2012/8/17 Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>:
> > >
> > > 2012/8/17 Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
> > >>
> > >> Excerpts from Fabrízio de Royes Mello's message of vie ago 17 09:16:30
> > >> -0400 2012:
> > >>
> > >> > The attached patch contains regression tests for it.
> > >>
> > >> I think you're missing support in copyfuncs.c and equalfuncs.c for the
> > >> new field in the node.
> > >
> > > You're completely right, thanks...
> > >
> > > The attached patch add support for the new field in the node in
> > > "copyfuncs.c" and "equalfuncs.c".
> >
> > Maybe I'm missing something but shouldn't it being handled in
> extension.c too?
>
> Please be more explicit? I don't know what you mean.
>
>
Returning conversation to the list.

I think he talked about this piece of code:

diff --git a/src/backend/commands/extension.c
b/src/backend/commands/extension.c
index 8512cdb..e359a9c 100644
--- a/src/backend/commands/extension.c
+++ b/src/backend/commands/extension.c
@@ -1374,6 +1374,7 @@ CreateExtension(CreateExtensionStmt *stmt)
csstmt->schemaname = schemaName;
csstmt->authid = NULL; /* will be created
by current user */
csstmt->schemaElts = NIL;
+ csstmt->if_not_exists = false;
CreateSchemaCommand(csstmt, NULL);

/*

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello

Attachment Content-Type Size
create_schema_if_not_exists_v5.patch application/octet-stream 7.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message johnlumby 2012-08-17 22:28:31 asynchronous disk io (was : tuplesort memory usage)
Previous Message Josh Berkus 2012-08-17 20:53:54 Re: Planner avoidance of index only scans for partial indexes