From: Mathijs Brands <mathijs@ilse.nl>
To: David Olbersen <dave@slickness.org>
Cc: Jeff S. <pgsqluser@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How do I use text script containing SQL?
Date: Mon, 5 Mar 2001 23:14:13 +0100
Message-ID: <20010305231413.C22983@ilse.nl> (raw)
In-Reply-To: <Pine.LNX.4.31.0103051108010.925-100000@bubbles.electricutopia.net>
References: <20010305185600.44574.qmail@web12702.mail.yahoo.com>
<Pine.LNX.4.31.0103051108010.925-100000@bubbles.electricutopia.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: mathijs@ilse.nl, dave@slickness.org, pgsqluser@yahoo.com
Subject: Re: How do I use text script containing SQL?
In-Reply-To: <20010305231413.C22983@ilse.nl>
References: <20010305185600.44574.qmail@web12702.mail.yahoo.com> <Pine.LNX.4.31.0103051108010.925-100000@bubbles.electricutopia.net> <20010305231413.C22983@ilse.nl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox