public inbox for [email protected]
help / color / mirror / Atom feedFrom: jian he <[email protected]>
To: Tom Lane <[email protected]>
Cc: Adrian Klaver <[email protected]>
Cc: Magnus Hagander <[email protected]>
Cc: David Gauthier <[email protected]>
Cc: [email protected]
Subject: Re: \dt shows table but \d <table> says the table doesn't exist ?
Date: Sat, 4 May 2024 11:40:56 +0800
Message-ID: <CACJufxF=VJ=wprULGXLuAaSt5j+4w0=66HzKDQ9GEKFXMo1-bg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAEs=6DnMQCAF_c+=Vup8qnOM1OT1GfFq6nzGF2a3EhgnyrjpMg@mail.gmail.com>
<CABUevEwkSS_FhL0Zi1_m3oU5WqELHF+qQfCLDK3e__qTsYdsYw@mail.gmail.com>
<[email protected]>
<[email protected]>
On Sat, May 4, 2024 at 5:15 AM Tom Lane <[email protected]> wrote:
>
> Adrian Klaver <[email protected]> writes:
> > On 5/3/24 14:06, Magnus Hagander wrote:
> >> Looks like you might need a \d "some_idIds" (include the quotes) since
> >> it has an uppercase characters?
>
> > This:
> > "Did not find any relation named "public.some_idIds"."
> > to me indicates it did look for the properly cased name.
>
> No, that message just regurgitates what you typed. Magnus is
> correct that the pattern will be case-folded if not quoted.
> You can check with --echo-hidden (-E):
>
> postgres=# \d public.some_idIds
> /******** QUERY *********/
> SELECT c.oid,
> n.nspname,
> c.relname
> FROM pg_catalog.pg_class c
> LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
> WHERE c.relname OPERATOR(pg_catalog.~) '^(some_idids)$' COLLATE pg_catalog.default
> AND n.nspname OPERATOR(pg_catalog.~) '^(public)$' COLLATE pg_catalog.default
> ORDER BY 2, 3;
> /************************/
>
> Did not find any relation named "public.some_idIds".
>
> So it is in fact looking for public.some_idids.
>
make it case insensitive?
like
> WHERE c.relname OPERATOR(pg_catalog.~*) '^(some_idids)$' COLLATE pg_catalog.default
we already transformed `\d SOME_IDIDS` to `\d some_idids`, in some way
it looks case-insensitive.
view thread (17+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: \dt shows table but \d <table> says the table doesn't exist ?
In-Reply-To: <CACJufxF=VJ=wprULGXLuAaSt5j+4w0=66HzKDQ9GEKFXMo1-bg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox