Re: psql \i --UPDATE

From: Richard Harvey Chapman <hchapman(at)3gfp(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: psql \i --UPDATE
Date: 2000-07-14 21:33:07
Message-ID: Pine.LNX.4.10.10007141430090.21594-100000@smile.3gfp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This turned out to be a problem that I discovered before with psql's
parser not correctly handling single quotation marks within C style
comments. I have my file under source control with the revision
information nested inside some C style comments, but one of the revision
change messages had a single quote in it.

BTW single quotes behind "--" work fine.

R.

On Wed, 12 Jul 2000, Richard Harvey Chapman wrote:

> I have a text file of SQL commands which contains tabs. I used to be able
> to import it using psql using "\i file.sql". Now, I've upgraded to 7.0.2
> and it treats the file as if I'm entering it all in manually. It treats
> the tabs as completion commands.
>
> CREATE TABLE alpha (
> <TAB>num<TAB>SERIAL PRIMARY KEY
> );
>
> will return a syntax error at PRIMARY because it sees the following:
>
> CREATE TABLE alpha (
> numSERIAL PRIMARY KEY
> );
>
> Is there something new that I have to do?
>
> (besides converting the tabs -- if all else fails, I'll do that)
>
> R.
>
>

In response to

  • psql \i at 2000-07-12 18:26:36 from Richard Harvey Chapman

Browse pgsql-general by date

  From Date Subject
Next Message Eric Jain 2000-07-15 09:31:36 COUNT DISTINCT
Previous Message Tom Lane 2000-07-14 21:19:18 Re: Escaping parenthesis in regular expressions....