7.3B3 psql talking to a 7.2.3 server?

Started by Larry Rosenmanabout 23 years ago12 messages
#1Larry Rosenman
ler@lerctr.org

Is the following supposed to work?

$ psql -U neteng -h tide netmaster
ERROR: parser: parse error at or near "."
Welcome to psql 7.3b3, 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

netmaster=> select version();
version
---------------------------------------------------------------------
PostgreSQL 7.2.1 on i386-portbld-freebsd4.5, compiled by GCC 2.95.3
(1 row)

netmaster=>

neteng **IS** a superuser on tide.

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

#2Rod Taylor
rbt@rbt.ca
In reply to: Larry Rosenman (#1)
Re: 7.3B3 psql talking to a 7.2.3 server?

On Fri, 2002-11-01 at 11:30, Larry Rosenman wrote:

Is the following supposed to work?

$ psql -U neteng -h tide netmaster
ERROR: parser: parse error at or near "."

7.3 psql is schema safe.

So... it's trying to do silly things like:
SELECT * FROM pg_catalog.pg_class;

Of course, 7.2 and earlier did not support such syntax.

--
Rod Taylor

#3Larry Rosenman
ler@lerctr.org
In reply to: Rod Taylor (#2)
Re: 7.3B3 psql talking to a 7.2.3 server?

On Fri, 2002-11-01 at 10:38, Rod Taylor wrote:

On Fri, 2002-11-01 at 11:30, Larry Rosenman wrote:

Is the following supposed to work?

$ psql -U neteng -h tide netmaster
ERROR: parser: parse error at or near "."

7.3 psql is schema safe.

So... it's trying to do silly things like:
SELECT * FROM pg_catalog.pg_class;

Of course, 7.2 and earlier did not support such syntax.

I know this, the question is, Should this happen? If not, can we fix it
somehow?

Or do we need to put a note somewhere?

LER

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Larry Rosenman (#1)
Re: 7.3B3 psql talking to a 7.2.3 server?

Larry Rosenman <ler@lerctr.org> writes:

Is the following supposed to work?

No. 7.3 psql uses schema syntax in its internal queries, so it will
fail to detect superuser status on pre-7.3 backends. Most backslash
commands won't work very well either :-(. However, manually issued
SQL should work as expected.

regards, tom lane

#5Larry Rosenman
ler@lerctr.org
In reply to: Tom Lane (#4)
Re: 7.3B3 psql talking to a 7.2.3 server?

On Fri, 2002-11-01 at 10:43, Tom Lane wrote:

Larry Rosenman <ler@lerctr.org> writes:

Is the following supposed to work?

No. 7.3 psql uses schema syntax in its internal queries, so it will
fail to detect superuser status on pre-7.3 backends. Most backslash
commands won't work very well either :-(. However, manually issued
SQL should work as expected.

Should this be prominent in some doc somewhere?

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

#6Rod Taylor
rbt@rbt.ca
In reply to: Larry Rosenman (#3)
Re: 7.3B3 psql talking to a 7.2.3 server?

I know this, the question is, Should this happen? If not, can we fix it
somehow?

Or do we need to put a note somewhere?

I think it's a little late to fix now.

Making psql support multiple versions was a suggestion Tom made a while
back, but nobody took up the challenge.

--
Rod Taylor

#7Larry Rosenman
ler@lerctr.org
In reply to: Rod Taylor (#6)
Re: 7.3B3 psql talking to a 7.2.3 server?

On Fri, 2002-11-01 at 12:25, Rod Taylor wrote:

I know this, the question is, Should this happen? If not, can we fix it
somehow?

Or do we need to put a note somewhere?

I think it's a little late to fix now.

Making psql support multiple versions was a suggestion Tom made a while
back, but nobody took up the challenge.

Hmm. Ok. How about a cross-version/upgrade note somewhere?

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

#8Rod Taylor
rbt@rbt.ca
In reply to: Larry Rosenman (#7)
Re: 7.3B3 psql talking to a 7.2.3 server?

On Fri, 2002-11-01 at 14:18, Larry Rosenman wrote:

On Fri, 2002-11-01 at 12:25, Rod Taylor wrote:

I know this, the question is, Should this happen? If not, can we fix it
somehow?

Or do we need to put a note somewhere?

I think it's a little late to fix now.

Making psql support multiple versions was a suggestion Tom made a while
back, but nobody took up the challenge.

Hmm. Ok. How about a cross-version/upgrade note somewhere?

Probably worth while mentioning on the psql client page that clients are
only expected to work with the version they're released with. Some
functionality may be missing otherwise.

--
Rod Taylor

#9Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Rod Taylor (#8)
Re: 7.3B3 psql talking to a 7.2.3 server?

Rod Taylor wrote:

On Fri, 2002-11-01 at 14:18, Larry Rosenman wrote:

On Fri, 2002-11-01 at 12:25, Rod Taylor wrote:

I know this, the question is, Should this happen? If not, can we fix it
somehow?

Or do we need to put a note somewhere?

I think it's a little late to fix now.

Making psql support multiple versions was a suggestion Tom made a while
back, but nobody took up the challenge.

Hmm. Ok. How about a cross-version/upgrade note somewhere?

Probably worth while mentioning on the psql client page that clients are
only expected to work with the version they're released with. Some
functionality may be missing otherwise.

We have always allowed old clients to connect to new servers, but often
break new servers connecting to old clients. I think this is documented
somewhere, but it rarely comes up as an issue.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#10Larry Rosenman
ler@lerctr.org
In reply to: Bruce Momjian (#9)
Re: 7.3B3 psql talking to a 7.2.3 server?

On Fri, 2002-11-01 at 21:54, Bruce Momjian wrote:

Rod Taylor wrote:

On Fri, 2002-11-01 at 14:18, Larry Rosenman wrote:

On Fri, 2002-11-01 at 12:25, Rod Taylor wrote:

I know this, the question is, Should this happen? If not, can we fix it
somehow?

Or do we need to put a note somewhere?

I think it's a little late to fix now.

Making psql support multiple versions was a suggestion Tom made a while
back, but nobody took up the challenge.

Hmm. Ok. How about a cross-version/upgrade note somewhere?

Probably worth while mentioning on the psql client page that clients are
only expected to work with the version they're released with. Some
functionality may be missing otherwise.

We have always allowed old clients to connect to new servers, but often
break new servers connecting to old clients. I think this is documented
somewhere, but it rarely comes up as an issue.

So, what do we do in this case, where an OLDER client (<=7.2.3) connects
to a new (>=7.3) server, and BASIC stuff like backslash commands BREAK
because of the schema stuff?

IT NEEDS TO BE AT LEAST DOCUMENTED PROMINENTLY.

(IMHO).

LER

-- 
Bruce Momjian                        |  http://candle.pha.pa.us
pgman@candle.pha.pa.us               |  (610) 359-1001
+  If your life is a hard drive,     |  13 Roberts Road
+  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

#11Rod Taylor
rbt@rbt.ca
In reply to: Larry Rosenman (#10)
Re: 7.3B3 psql talking to a 7.2.3 server?

We have always allowed old clients to connect to new servers, but often
break new servers connecting to old clients. I think this is documented
somewhere, but it rarely comes up as an issue.

So, what do we do in this case, where an OLDER client (<=7.2.3) connects
to a new (>=7.3) server, and BASIC stuff like backslash commands BREAK
because of the schema stuff?

All version mismatches are expected to cause some psql features to
fail. But the basics still work fine. 7.3 happens to be a little more
severe than previous releases -- though 7.0 <-> 7.1 wasn't overly happy
either.

See the third point in the 'NOTES' section on:
http://developer.postgresql.org/docs/postgres/app-psql.html

"psql only works smoothly with servers of the same version. That does
not mean other combinations will fail outright, but subtle and
not-so-subtle problems might come up. Backslash commands are
particularly likely to fail if the server is of a different version."

However, perhaps this version is worthy of a remark in the release notes
with the schema description:

Non-schema aware versions of the utilities distributed with PostgreSQL
to be 100% functional with PostgreSQL >= 7.3.

--
Rod Taylor

#12Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Larry Rosenman (#10)
Re: 7.3B3 psql talking to a 7.2.3 server?

Larry Rosenman wrote:

We have always allowed old clients to connect to new servers, but often
break new servers connecting to old clients. I think this is documented
somewhere, but it rarely comes up as an issue.

So, what do we do in this case, where an OLDER client (<=7.2.3) connects
to a new (>=7.3) server, and BASIC stuff like backslash commands BREAK
because of the schema stuff?

IT NEEDS TO BE AT LEAST DOCUMENTED PROMINENTLY.

In the case you are describing, it is new clients connecting to old
servers. We have had several releases where this caused problems but
received few error reports.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073