Skip site navigation (1) Skip section navigation (2)

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$ (view raw, whole thread or download thread mbox)
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:

"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 (";")."

Honi soit qui mal y pense.

In response to

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group