Re: How do I use text script containing SQL?

Поиск
Список
Период
Сортировка
От Mathijs Brands
Тема Re: How do I use text script containing SQL?
Дата
Msg-id 20010305231413.C22983@ilse.nl
обсуждение исходный текст
Ответ на Re: How do I use text script containing SQL?  (David Olbersen <dave@slickness.org>)
Список pgsql-sql
On Mon, Mar 05, 2001 at 11:08:40AM -0800, David Olbersen allegedly wrote:
> On Mon, 5 Mar 2001, Jeff S. wrote:
> 
> ->I want to be able to use the file to create my table.
> ->I've tried psql -d databasename -e < filename.txt
> ->but that doesn't work.
> 
> You're making it too dificult :-)
> 'psql -d databasename < filename.txt' should work just fine

Strange, the syntax you used (psql -d <dbname> -e) should work...

serv0:~$ echo '\d ntree' | psql -d iig -e        Table "ntree"Attribute |  Type   | Modifier
-----------+---------+----------pid       | integer |cid       | integer |
Indices: idx_ntree_cid,        idx_ntree_pid

I'm using psql 7.0.3 and I'm pretty sure it also works for 6.5.x.

Mathijs
-- 
It's not that perl programmers are idiots, it's that the language
rewards idiotic behavior in a way that no other language or tool has
ever done.                                                   Erik Naggum


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

Предыдущее
От: Justin Long
Дата:
Сообщение: Re: Optimizing Query
Следующее
От: Justin Long
Дата:
Сообщение: Re: Optimizing Query