Re: Annoying messages when copy sql code to psql terminal

From: Reece Hart <reece(at)harts(dot)net>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: A B <gentosaker(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Annoying messages when copy sql code to psql terminal
Date: 2008-06-06 17:13:53
Message-ID: 1212772433.7018.12.camel@snafu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2008-06-05 at 22:28 -0400, Merlin Moncure wrote:

> As others have noted, you have tabs in your sql source. I'd advise if
> possible, not to use the tab character in sql, for this and other
> reasons.

Tabs in SQL are a problem only if you copy-paste. If your editor and
psql can see the same files (i.e., are running on the same machine or
you're saving to a network fs), it's more reliable to save the file and
read it in psql with \i or with psql -f. (\i and -f won't try to do tab
completion, of course.)

-Reece

--
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roberts, Jon 2008-06-06 18:02:58 Re: when to reindex?
Previous Message Scott Marlowe 2008-06-06 17:05:42 Re: Annoying messages when copy sql code to psql terminal