Re: Postgresql and scripting

From: Devrim GUNDUZ <devrim(at)gunduz(dot)org>
To: Jerome Lyles <susemail(at)hawaii(dot)rr(dot)com>
Cc: pgsql-general(at)PostgreSQL(dot)org
Subject: Re: Postgresql and scripting
Date: 2004-09-07 11:32:23
Message-ID: Pine.LNX.4.61.0409071429400.12570@emo.org.tr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On Tue, 7 Sep 2004, Jerome Lyles wrote:

> I'm trying to create and populate some study tables using a couple of scripts
> that came with my 'SQL in 10 minutes' book. This is how I tried to run the
> script to create and populate tables in a database named test:
>
> test-# \i create.txt
> psql:create.txt:1: ERROR: syntax error at or near "" at character 1
>
> Here is the top of the script:
> ------------------------------------------------------------
> - - S a m s T e a c h Y o u r s e l f S Q L i n 1 0 M i n u t e
> s

The single dash must be --. PostgreSQL treats -- as the comment lines.
i.e.:

- --------------
- -- Sams Teach ...
- --

Anyway, IMHO you should directly begin with the following line:

> CREATE TABLE customers
...

The lines above this one are useless comments.

Regards,
- --
Devrim GUNDUZ
devrim~gunduz.org devrim.gunduz~linux.org.tr
http://www.tdmsoft.com
http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBPZxKtl86P3SPfQ4RAgMbAJ9m3zTRnZiKtlmn0LI3MgjMDP/CdACeJ2rp
fR/DMnCjNbPLEsSDIampUJk=
=OexA
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tore Halset 2004-09-07 11:33:52 ERROR: canceling query due to user request
Previous Message Jerome Lyles 2004-09-07 11:24:38 Postgresql and scripting