Re: pgstattuple does not work with uppercase table names - Mailing list pgsql-bugs

From Magnus Hagander
Subject Re: pgstattuple does not work with uppercase table names
Date
Msg-id CABUevEzKTRJHJVG0OAsbsUUN6yJS1FwYxQso_Mgc3Cui837giQ@mail.gmail.com
Whole thread Raw
In response to pgstattuple does not work with uppercase table names  (Andreas Eriksson <andreas.eriksson@griffeye.com>)
Responses RE: pgstattuple does not work with uppercase table names
List pgsql-bugs

On Fri, Nov 2, 2018 at 11:51 AM Andreas Eriksson <andreas.eriksson@griffeye.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".

--

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15484: Comment on BUG report BUG #15450: postgis 2.4 and postgis2.5 extention not properly built
Next
From: Andreas Eriksson
Date:
Subject: RE: pgstattuple does not work with uppercase table names