Re: Pluggable Storage - Andres's take - Mailing list pgsql-hackers

From Haribabu Kommi
Subject Re: Pluggable Storage - Andres's take
Date
Msg-id CAJrrPGfzfwG7pE0Ja=8y5TCGvXwk+E7+M5SiWnYY-s8FzFNRqQ@mail.gmail.com
Whole thread Raw
In response to Re: Pluggable Storage - Andres's take  (Haribabu Kommi <kommi.haribabu@gmail.com>)
List pgsql-hackers

Hi,

The psql \dA commands currently doesn't show the type of the access methods of
type 'Table'.

postgres=# \dA heap
List of access methods
 Name | Type  
------+-------
 heap | 
(1 row)

Attached a simple patch that fixes the problem and outputs as follows.

postgres=# \dA heap
List of access methods
 Name | Type  
------+-------
 heap | Table
(1 row)

The attached patch directly modifies the query that is sent to the server.
Servers < 12 doesn't support of type 'Table', so the same query can work,
because of the case addition as follows.

SELECT amname AS "Name",
          CASE amtype WHEN 'i' THEN 'Index' WHEN 't' THEN 'Table' END AS "Type"
        FROM pg_catalog.pg_am ...

Anyone feels that it requires a separate query for servers < 12?

Regards,
Haribabu Kommi
Fujitsu Australia
Attachment

pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: Pluggable Storage - Andres's take
Next
From: Noah Misch
Date:
Subject: Re: [HACKERS] WAL logging problem in 9.4.3?