David Abrahams wrote:
John Hampton <[EMAIL PROTECTED]>
Depends on how good your SQL-foo is.
How shall I put this?... I think "nonexistent" would probably only be
a slight exaggeration.
Well, I think investing a little bit of time in learning a tad of SQL
will benefit you greatly.
create schema bob;
set search_path to bob;
at the top, and that should do it.
Hmm, do what?
Since you're using SQLite, it complicates the conversion a little.
SQLite has the ability to dump a database. I believe that you simply do
(check the docs for verification):
sqlite dbname .dump > outfile
This will give you a file that has a bunch of SQL statements in it. You
will need to modify it slightly as SQLite and PostgreSQL are a tad
different. Unfortunately, I don't know the differences well enough. I
also use PostgreSQL exclusively, so I haven't had to do such conversion.
Once the "outfile" is modified such that it works with PostgreSQL, you
can set the schema by adding the following lines at the top of the file:
create schema bob;
set search_path to bob;
Where "bob" is the name of the schema you're going to use. You can then
load said file into PostgreSQL via:
psql -U username dbname -f outfile
And that should do it.
-John
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac