Thread: PSQL \x \l command issues

PSQL \x \l command issues

From
Shad
Date:
I just recently upgraded from 7.0.x to 7.2.1.  I installed from
postgresql-7.2.1-2PGDG.i386.rpm on a Linux Redhat 7.1 system.  I was
able to resolve most dependancies, except for it telling me that I
needed libreadline.so.4, which " ldconfig -p|grep readline" showed me I
already had, so forced a --nodeps on it.
Here's a self explanitory paste of what happens when I use \x  or \l in
PSQL
-------------------------------------------------------------------------------------

psql --version
psql (PostgreSQL) 7.2.1
contains support for: readline, history, multibyte
Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
Portions Copyright (c) 1996, Regents of the University of California
Read the file COPYRIGHT or use the command \copyright to see the
usage and distribution terms.
psql -E template1
********* QUERY **********
SELECT usesuper FROM pg_user WHERE usename = 'root'
**************************

Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms      \h for help with SQL commands      \? for help on internal slash commands
    \g or terminate with semicolon to execute query      \q to quit
 

template1=# \z
********* QUERY **********
SELECT relname as "Table",      relacl as "Access privileges"
FROM   pg_class
WHERE  relkind in ('r', 'v', 'S') AND      relname NOT LIKE 'pg$_%' ESCAPE '$'
ORDER BY 1;
**************************

ERROR:  parser: parse error at or near "escape"
template1=# \l
********* QUERY **********
SELECT d.datname as "Name",      u.usename as "Owner",      pg_encoding_to_char(d.encoding) as "Encoding"
FROM pg_database d LEFT JOIN pg_user u ON d.datdba = u.usesysid
ORDER BY 1;
**************************

ERROR:  OUTER JOIN is not yet supported
template1=# \q
--------------------------------------------------------------------

As you can see, \x and \l in PSQL fail to work straight from
installation in my case.  Anybody have any ideas?





Re: PSQL \x \l command issues

From
Doug McNaught
Date:
Shad <shad@okcmobiletech.com> writes:

> I just recently upgraded from 7.0.x to 7.2.1.  I installed from
> postgresql-7.2.1-2PGDG.i386.rpm on a Linux Redhat 7.1 system.  I was
> able to resolve most dependancies, except for it telling me that I
> needed libreadline.so.4, which " ldconfig -p|grep readline" showed me I
> already had, so forced a --nodeps on it.
> Here's a self explanitory paste of what happens when I use \x  or \l in
> PSQL

It looks like you may still have some of the old installation
around--what does "select version();" tell you?

-Doug


Re: PSQL \x \l command issues

From
Tom Lane
Date:
Shad <shad@okcmobiletech.com> writes:
> I just recently upgraded from 7.0.x to 7.2.1.

You are clearly still talking to the 7.0 server:

> ERROR:  OUTER JOIN is not yet supported

In general, psql's backslash commands tend to be version-specific,
and may fail when talking to a server of a different version.
        regards, tom lane


Re: PSQL \x \l command issues

From
Shad
Date:


> You are clearly still talking to the 7.0 server:
> In general, psql's backslash commands tend to be version-specific,
> and may fail when talking to a server of a different version.
>

That was it.  I never thought to check the postgresql version, I just
did a quick check of the psql version to verifiy the rpm installation.
Thanks for the insight