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

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: pg_dump of only the structure from a client such as ruby
Дата
Msg-id 25F7595B-3773-4200-8E53-46EE971933F7@seespotcode.net
обсуждение исходный текст
Ответ на pg_dump of only the structure from a client such as ruby  (Perry Smith <pedz@easesoftware.com>)
Ответы Re: pg_dump of only the structure from a client such as ruby
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: Paul Lambert
Дата:
Сообщение: Changing column types
Следующее
От: Paul Lambert
Дата:
Сообщение: Re: Changing column types