[ARVADOS] updated: da80f4a198e734313a7991466244083dabd64b00

git at public.curoverse.com git at public.curoverse.com
Tue Jul 7 11:42:38 EDT 2015


Summary of changes:
 services/api/Rakefile         | 31 +++++++++++++++++++++++++++++++
 services/api/db/structure.sql |  2 +-
 2 files changed, 32 insertions(+), 1 deletion(-)

       via  da80f4a198e734313a7991466244083dabd64b00 (commit)
       via  c428f31ab63f8414973848455ab7c44ed4a1d51b (commit)
      from  fdb63be9fde8ea69e78e68f77bb0ab00a79a8d6f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit da80f4a198e734313a7991466244083dabd64b00
Merge: fdb63be c428f31
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Jul 7 11:42:12 2015 -0400

    Merge branch '5677-plpgsql-warning' closes #5677


commit c428f31ab63f8414973848455ab7c44ed4a1d51b
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Jun 26 02:54:31 2015 -0400

    5677: Edit structure.sql after db:structure:dump: avoid warnings when loading, and editwars when committing.

diff --git a/services/api/Rakefile b/services/api/Rakefile
index 22b2531..fbbf53e 100644
--- a/services/api/Rakefile
+++ b/services/api/Rakefile
@@ -32,3 +32,34 @@ namespace :test do
     end
   end
 end
+
+namespace :db do
+  namespace :structure do
+    task :dump do
+      require 'tempfile'
+      origfnm = File.expand_path('../db/structure.sql', __FILE__)
+      tmpfnm = Tempfile.new 'structure.sql', File.expand_path('..', origfnm)
+      begin
+        tmpfile = File.new tmpfnm, 'w'
+        origfile = File.new origfnm
+        origfile.each_line do |line|
+          if /^SET lock_timeout = 0;/ =~ line
+            # Avoid edit wars between versions that do/don't write this line.
+            next
+          elsif /^COMMENT ON EXTENSION/ =~ line
+            # Avoid warning message when loading:
+            # "structure.sql:22: ERROR:  must be owner of extension plpgsql"
+            tmpfile.write "-- "
+          end
+          tmpfile.write line
+        end
+        origfile.close
+        tmpfile.close
+        File.rename tmpfnm, origfnm
+        tmpfnm = false
+      ensure
+        File.unlink tmpfnm if tmpfnm
+      end
+    end
+  end
+end
diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index 0eef6b4..01bb417 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -19,7 +19,7 @@ CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
 --
 
-COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
+-- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
 
 
 SET search_path = public, pg_catalog;

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list