Changeset adecc10 in osmose-backend


Ignore:
Timestamp:
Jul 26, 2014 12:56:20 PM (5 years ago)
Author:
Jocelyn Jaubert <jocelyn.jaubert@…>
Branches:
master
Children:
4ae2a07
Parents:
b324b08
git-author:
Jocelyn Jaubert <jocelyn.jaubert@…> (24/07/2014 19:09:55)
git-committer:
Jocelyn Jaubert <jocelyn.jaubert@…> (26/07/2014 12:56:20)
Message:

Fix schema creation in Analyser_Merge.py

'CREATE SCHEMA IF NOT EXISTS' was added in pgsql 9.3, and is not present in
older versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • analysers/Analyser_Merge.py

    rb324b08 radecc10  
    3232 
    3333sql_schema = """ 
    34 CREATE SCHEMA IF NOT EXISTS %(schema)s; 
     34DO language 'plpgsql' $$ 
     35BEGIN 
     36  IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = '%(schema)s' ) THEN 
     37    CREATE SCHEMA %(schema)s; 
     38  END IF; 
     39END $$ 
    3540""" 
    3641 
Note: See TracChangeset for help on using the changeset viewer.