Re: [HACKERS] new table partitioning breaks \d table to older versions

2016-12-12 Thread Robert Haas
On Fri, Dec 9, 2016 at 1:18 PM, Fabrízio de Royes Mello
 wrote:
> On Fri, Dec 9, 2016 at 3:59 PM, Jeff Janes  wrote:
>> Since:
>> commit f0e44751d7175fa3394da2c8f85e3ceb3cdbfe63
>> Author: Robert Haas 
>> Date:   Wed Dec 7 13:17:43 2016 -0500
>>
>> Implement table partitioning.
>>
>> If I use psql compiled from 10devel to connect to a 9.6.1 server, then \d
>> fails:
>>
>> psql (10devel-f0e4475, server 9.6.1-16e7c02)
>> Type "help" for help.
>>
>>
>> # \d pgbench_accounts
>> ERROR:  column c.relpartbound does not exist
>> LINE 1: ...ELECT inhparent::pg_catalog.regclass, pg_get_expr(c.relpartb...
>>
>
> Looks like they forgot to adjust version check number in describe.c code.
>
> Attched patch fix it.

Committed.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] new table partitioning breaks \d table to older versions

2016-12-09 Thread Jeff Janes
On Fri, Dec 9, 2016 at 10:18 AM, Fabrízio de Royes Mello <
fabriziome...@gmail.com> wrote:

>
>
> On Fri, Dec 9, 2016 at 3:59 PM, Jeff Janes  wrote:
> >
> > Since:
> >
> > commit f0e44751d7175fa3394da2c8f85e3ceb3cdbfe63
> > Author: Robert Haas 
> > Date:   Wed Dec 7 13:17:43 2016 -0500
> >
> > Implement table partitioning.
> >
> > If I use psql compiled from 10devel to connect to a 9.6.1 server, then
> \d fails:
> >
> > psql (10devel-f0e4475, server 9.6.1-16e7c02)
> > Type "help" for help.
> >
> >
> > # \d pgbench_accounts
> > ERROR:  column c.relpartbound does not exist
> > LINE 1: ...ELECT inhparent::pg_catalog.regclass,
> pg_get_expr(c.relpartb...
> >
>
> Looks like they forgot to adjust version check number in describe.c code.
>
> Attched patch fix it.
>

Tested (but not read) and it fixes it for me.  thanks.

Jeff


Re: [HACKERS] new table partitioning breaks \d table to older versions

2016-12-09 Thread Amit Langote
On Sat, Dec 10, 2016 at 2:59 AM, Jeff Janes  wrote:
> Since:
>
> commit f0e44751d7175fa3394da2c8f85e3ceb3cdbfe63
> Author: Robert Haas 
> Date:   Wed Dec 7 13:17:43 2016 -0500
>
> Implement table partitioning.
>
> If I use psql compiled from 10devel to connect to a 9.6.1 server, then \d
> fails:
>
> psql (10devel-f0e4475, server 9.6.1-16e7c02)
> Type "help" for help.
>
>
> # \d pgbench_accounts
> ERROR:  column c.relpartbound does not exist
> LINE 1: ...ELECT inhparent::pg_catalog.regclass, pg_get_expr(c.relpartb...

Oops, server version check was added to the relevant code for pg_dump,
but not psql...  Will send a patch soon.  Thanks for catching it.

Thanks,
Amit


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] new table partitioning breaks \d table to older versions

2016-12-09 Thread Fabrízio de Royes Mello
On Fri, Dec 9, 2016 at 3:59 PM, Jeff Janes  wrote:
>
> Since:
>
> commit f0e44751d7175fa3394da2c8f85e3ceb3cdbfe63
> Author: Robert Haas 
> Date:   Wed Dec 7 13:17:43 2016 -0500
>
> Implement table partitioning.
>
> If I use psql compiled from 10devel to connect to a 9.6.1 server, then \d
fails:
>
> psql (10devel-f0e4475, server 9.6.1-16e7c02)
> Type "help" for help.
>
>
> # \d pgbench_accounts
> ERROR:  column c.relpartbound does not exist
> LINE 1: ...ELECT inhparent::pg_catalog.regclass, pg_get_expr(c.relpartb...
>

Looks like they forgot to adjust version check number in describe.c code.

Attched patch fix it.

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index f0d955b..a582a37 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -1808,7 +1808,7 @@ describeOneTableDetails(const char *schemaname,
 	}
 
 	/* Make footers */
-	if (pset.sversion >= 90600)
+	if (pset.sversion >= 10)
 	{
 		/* Get the partition information  */
 		PGresult   *result;

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] new table partitioning breaks \d table to older versions

2016-12-09 Thread Jeff Janes
Since:

commit f0e44751d7175fa3394da2c8f85e3ceb3cdbfe63
Author: Robert Haas 
Date:   Wed Dec 7 13:17:43 2016 -0500

Implement table partitioning.

If I use psql compiled from 10devel to connect to a 9.6.1 server, then \d
fails:

psql (10devel-f0e4475, server 9.6.1-16e7c02)
Type "help" for help.


# \d pgbench_accounts
ERROR:  column c.relpartbound does not exist
LINE 1: ...ELECT inhparent::pg_catalog.regclass, pg_get_expr(c.relpartb...


Cheers,

Jeff