Thread: psql overwrites command line
--
her.datSELECT weather.city, weather.temp_lo, weather.temp_hi, weather.prcp, weat
--
--
mydb=# SELECT * FROM weather, cities WHERE city = name;
WHERE city =name;
city | temp_lo | temp_hi | prcp | date | location
---------------+---------+---------+------+------------+-----------
San Francisco | 46 | 50 | 0.25 | 1994-11-27 | (-194,53)
San Francisco | 43 | 57 | 0 | 1994-11-29 | (-194,53)
(2 rows)
;
city | temp_lo | temp_hi | prcp | date | location weather.city;
---------------+---------+---------+------+------------+-----------
San Francisco | 46 | 50 | 0.25 | 1994-11-27 | (-194,53)
San Francisco | 43 | 57 | 0 | 1994-11-29 | (-194,53)
(2 rows)
--
Note the extraneous semi colon above the location in the second table, as well as the extraneous weather.city; and the duplicated WHERE city =name; in the first table.
Malik Rumi <malik.a.rumi@gmail.com> writes: > [ assorted misbehavior ] > Can someone tell me a) what is going on here and b) how to fix it? Thanks. What it looks like is that psql has the wrong idea about what sort of terminal you're using (ie, which command language your terminal window understands). With no more info than that you're on Ubuntu, it's hard to be more specific than that. But try "echo $TERM" at the shell command line to see what psql is being told about this, and then see if that squares with the documentation about your terminal program. regards, tom lane
On 11 Apr 2015 10:52 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>
> Malik Rumi <malik.a.rumi@gmail.com> writes:
> > [ assorted misbehavior ]
> > Can someone tell me a) what is going on here and b) how to fix it? Thanks.
>
> What it looks like is that psql has the wrong idea about what sort of
> terminal you're using (ie, which command language your terminal
> window understands). With no more info than that you're on Ubuntu,
> it's hard to be more specific than that. But try "echo $TERM" at the
> shell command line to see what psql is being told about this, and then
> see if that squares with the documentation about your terminal program.
Also if you have binary data that is output to the terminal as a result of one of your queries it might have messed up your terminal in which case you could choose one of the reset options from the menu to see if it helps.