Search Postgresql Archives

Re: pg_dump of only the structure from a client such as ruby

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Aug 5, 2007, at 16:31 , Perry Smith wrote:

I'm trying to help out the rails people. Currently they have "rake" scripts which call pg_dump, dropdb, createdb, and psql. It would be nicer if this could be done via a database connection.

Why would this be nicer? What's the advantage? pg_dump in particular *is* a client application. It isn't called from within another connection. As loading a schema from a file via psql, that's also fairly common practice. Alternatives to createdb or dropdb are just as easily handled by passing a command to psql using its -c flag. Another point to consider is that using CREATE/DROP DATABASE instead of the createdb/dropdb client applications requires a database connection: if you don't have a database to connect to, you can't use them. Of course, you could initially connect to the postgres database (or template1 in older version), but that could require configuring parameters for another database in database.yml. What's the advantage?

Michael Glaesemann
grzm seespotcode net



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux