Re: \dt shows table but \d says the table doesn't exist ?

2024-05-05 Thread hubert depesz lubaczewski
On Fri, May 03, 2024 at 04:58:26PM -0400, David Gauthier wrote: > Soo... what am I missing ? > owner is "cron_user". \dt shows cron_user is the owner of the table. Magnus already helped you, but you might want to check this: https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_upper_cas

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Tom Lane
"David G. Johnston" writes: > ... I’d welcome > a modifier like “*” (like the ~* operator) to enable case-insensitive > matching. We could talk about that idea, certainly. I'm afraid it's the sort of edge case that would mainly be useful to newbies who haven't read the docs closely enough to kno

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread David G. Johnston
On Friday, May 3, 2024, Adrian Klaver wrote: > > Have you met people? > I really don’t care enough to try and actually make converts here. It would have been a perfectly justifiable design choice to make our “pattern” matching case-insensitive by default, probably with a case-sensitive mode and

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Adrian Klaver
On 5/3/24 21:06, David G. Johnston wrote: On Friday, May 3, 2024, Tom Lane > wrote: By and large, I'd expect people using mixed-case table names to get accustomed pretty quickly to the fact that they have to double-quote those names in SQL.  I don't see wh

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Tom Lane
"David G. Johnston" writes: > On Friday, May 3, 2024, Tom Lane wrote: >> By and large, I'd expect people using mixed-case table names to get >> accustomed pretty quickly to the fact that they have to double-quote >> those names in SQL. I don't see why it's a surprise that that is also >> true in

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread David G. Johnston
On Friday, May 3, 2024, Tom Lane wrote: > > > By and large, I'd expect people using mixed-case table names to get > accustomed pretty quickly to the fact that they have to double-quote > those names in SQL. I don't see why it's a surprise that that is also > true in \d commands. > > Every day the

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Tom Lane
jian he writes: > make it case insensitive? That would just move the problem around; that is, now we'd have people complaining because they'd asked for "\d foo" and were getting results for tables Foo and FOO. By and large, I'd expect people using mixed-case table names to get accustomed pretty

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread jian he
On Sat, May 4, 2024 at 5:15 AM Tom Lane wrote: > > Adrian Klaver 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

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Isaac Morland
On Fri, 3 May 2024 at 17:28, Tom Lane wrote: This is one of the places where it's unfortunate that our English-text > rule for quoting a string to set it off from the rest of the error > message collides with SQL's rule for quoting an identifier. Leaving > out the outer quotes would be contrary

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Tom Lane
Magnus Hagander writes: > On Fri, May 3, 2024 at 11:08 PM Adrian Klaver > wrote: >> This: >> "Did not find any relation named "public.some_idIds"." >> to me indicates it did look for the properly cased name. > That is arguably a really bad error message, because it puts those quotes > there whet

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Tom Lane
Adrian Klaver 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.

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread David G. Johnston
On Fri, May 3, 2024 at 2:08 PM Adrian Klaver wrote: > On 5/3/24 14:06, Magnus Hagander wrote: > > > > > > On Fri, May 3, 2024 at 10:58 PM David Gauthier > > wrote: > > > > psql (15.3, server 14.5) on linux > > > > Someone else's DB which I've been asked to l

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Magnus Hagander
On Fri, May 3, 2024 at 11:08 PM Adrian Klaver wrote: > On 5/3/24 14:06, Magnus Hagander wrote: > > > > > > On Fri, May 3, 2024 at 10:58 PM David Gauthier > > wrote: > > > > psql (15.3, server 14.5) on linux > > > > Someone else's DB which I've been asked to

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Adrian Klaver
On 5/3/24 14:06, Magnus Hagander wrote: On Fri, May 3, 2024 at 10:58 PM David Gauthier > wrote: psql (15.3, server 14.5) on linux Someone else's DB which I've been asked to look at. \dt gives many tables, here are just 3...  public | some_idId

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Adrian Klaver
On 5/3/24 13:58, David Gauthier wrote: psql (15.3, server 14.5) on linux Someone else's DB which I've been asked to look at. \dt gives many tables, here are just 3...  public | some_idIds                                       | table | cron_user  public | WarningIds                        

Re: \dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread Magnus Hagander
On Fri, May 3, 2024 at 10:58 PM David Gauthier wrote: > psql (15.3, server 14.5) on linux > > Someone else's DB which I've been asked to look at. > > \dt gives many tables, here are just 3... > > public | some_idIds | table | > cron_user > public | WarningI

\dt shows table but \d says the table doesn't exist ?

2024-05-03 Thread David Gauthier
psql (15.3, server 14.5) on linux Someone else's DB which I've been asked to look at. \dt gives many tables, here are just 3... public | some_idIds | table | cron_user public | WarningIds | table | cron_user public |