Re: pgstattuple does not work with uppercase table names

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: andreas(dot)eriksson(at)griffeye(dot)com
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: pgstattuple does not work with uppercase table names
Date: 2018-11-02 10:54:39
Message-ID: CABUevEzKTRJHJVG0OAsbsUUN6yJS1FwYxQso_Mgc3Cui837giQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Nov 2, 2018 at 11:51 AM Andreas Eriksson <
andreas(dot)eriksson(at)griffeye(dot)com> wrote:

> Steps to reproduce:
>
> CREATE EXTENSION pgstattuple;
>
> CREATE TABLE "Test" AS SELECT * FROM generate_series(1, 10000);
>
> SELECT * FROM pgstattuple('Test');
>
>
>
> ERROR: relation "test" does not exist SQL state: 42P01
>
>
>

You need to quote the identifier:
SELECT * FROM pgstattuple('"Test"');

Note the double quotes inside the string, so
"singlequote-doublequote-Test-doublequote-singlequote".

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andreas Eriksson 2018-11-02 10:56:57 RE: pgstattuple does not work with uppercase table names
Previous Message PG Bug reporting form 2018-11-02 10:37:54 BUG #15484: Comment on BUG report BUG #15450: postgis 2.4 and postgis 2.5 extention not properly built