| From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> | 
|---|---|
| To: | Ayush Vatsa <ayushvatsa1810(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: Issue with pgstattuple on Sequences in PostgreSQL | 
| Date: | 2024-06-24 14:32:45 | 
| Message-ID: | f5ebd2dd-86ea-47f7-852e-62e3a772e70b@aklaver.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On 6/24/24 04:09, Ayush Vatsa wrote:
> Hi PostgreSQL Community,
> 
> I was recently exploring the pgstattuple code directory and found this 
> piece of code: 
> https://github.com/postgres/postgres/blob/master/contrib/pgstattuple/pgstattuple.c#L255-L259 <https://github.com/postgres/postgres/blob/master/contrib/pgstattuple/pgstattuple.c#L255-L259>.
> 
> It indicates that pgstattuple supports relations, toast tables, 
> materialized views, and sequences.
> However, when I executed a query with a sequence, I encountered the 
> following error:
> 
> postgres=> CREATE SEQUENCE serial START 101;
> CREATE SEQUENCE
> postgres=> SELECT * FROM pgstattuple('serial');
> ERROR:  only heap AM is supported
> postgres=>
File a bug report here:
https://www.postgresql.org/account/login/?next=/account/submitbug/
> 
> It got stuck in this if condition - 
> https://github.com/postgres/postgres/blob/master/contrib/pgstattuple/pgstattuple.c#L326-L329 <https://github.com/postgres/postgres/blob/master/contrib/pgstattuple/pgstattuple.c#L326-L329>
> How can one use pgstattuple on sequences?
> 
> Regards,
> Ayush Vatsa
> 
-- 
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2024-06-24 14:44:36 | Re: Execute permission to function | 
| Previous Message | David G. Johnston | 2024-06-24 13:35:54 | Re: Issue with pgstattuple on Sequences in PostgreSQL |