summaryrefslogtreecommitdiffstats
path: root/dia2pg.rb
diff options
context:
space:
mode:
Diffstat (limited to 'dia2pg.rb')
-rwxr-xr-xdia2pg.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/dia2pg.rb b/dia2pg.rb
index cf02445..3937da4 100755
--- a/dia2pg.rb
+++ b/dia2pg.rb
@@ -42,7 +42,7 @@ options.verbose = false
options.input = nil
options.drop = false
options.create = false
-options.odids = false
+options.oids = false
options.user = 'postgres'
options.tbl_prefix = nil
#
@@ -152,8 +152,8 @@ class Table
uq.each do |k,v| r << " UNIQUE(#{v.join ','}),\n" unless v.empty? end
r << " CONSTRAINT pk_#{name} PRIMARY KEY (#{pk.join ','})\n" if pk.length>0
r.sub!(/,\n$/,"\n")
- r << ")\nWITH (\n OIDS=#{@opts.oids ? 'TRUE' : 'FALSE'}\n);\n"
- r << "ALTER TABLE #{name} OWNER TO #{@opts.user};\n"
+ r << ") WITH ( OIDS='FALSE' " if @opts.oids
+ r << ");\nALTER TABLE #{name} OWNER TO #{@opts.user};\n"
idx.each do |k,v| r << "CREATE INDEX ON #{name} (#{v.join ','});\n" end
r
end