Re: failure and silence of SQL commands

From: Lew <noone(at)lewscanon(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: failure and silence of SQL commands
Date: 2011-04-28 13:40:42
Message-ID: ipbqo5$ks3$1@news.albasani.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Tom Lane wrote:
> "John Payne"<drjohnpayne(at)gmail(dot)com> writes:
>> I'm running psql version 8.1.11 on a Linux server from the command line. It
>> gives me absolutely no feedback from SQL commands and all SQL commands fail,
>> but the internal psql commands such as /d or /echo all work. I am not
>> running it in silent mode; the command I use to start it is just the
>> standard "psql -d database -U user". It tells me that I'm connected, I can
>> examine the tables, but it won't execute SQL.
>
> It would be easier to tell what was going on if you showed us a concrete
> example (ie cut and paste from your terminal window) ... but I'm going
> to take a stab in the dark and guess that maybe you're forgetting to
> terminate your SQL commands with semicolons?

That's my first guess, too. But OP, your problem description is rather
imprecise. Tom's suggestion to use copy-and-paste to give details is an
excellent one if you find out that semicolons (a normal part of any SQL
command) don't fix your issue.

Let's look at the manual where it first introduces SQL syntax:
<http://www.postgresql.org/docs/9.0/interactive/sql-syntax-lexical.html>

"4.1. Lexical Structure

"SQL input consists of a sequence of commands. A command is composed of a
sequence of tokens, terminated by a semicolon (";")."

--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message John Payne 2011-04-28 17:21:39 failure and silence of SQL commands
Previous Message Lew 2011-04-28 13:35:07 Re: weird results from trivial SELECT statement