Re: Cannot create index if table name contains uppercase characters

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: Oldr(ich Dlouhý <oldrich(dot)dlouhy(at)seznam(dot)cz>, "PGAdmin support forum" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Cannot create index if table name contains uppercase characters
Date: 2003-10-01 09:47:19
Message-ID: 03AF4E498C591348A42FC93DEA9661B83AF26F@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

This problem occurs because pgAdmin doesn't quote the table name as it should when mixed case names are involved. I have fixed this in CVS for the next release.

In order to create your indexes, you may use the SQL generated by pgAdmin, but add the quotes manually around the table name in the query tool eg.:

CREATE INDEX foo ON public."Bar" (colname);

Thanks for the bug report.

Regards, Dave.

> -----Original Message-----
> From: Oldr(ich Dlouhý [mailto:oldrich(dot)dlouhy(at)seznam(dot)cz]
> Sent: 01 October 2003 10:27
> To: PGAdmin support forum
> Subject: [pgadmin-support] Cannot create index if table name
> contains uppercase characters
>
>
> -- PGAdmin --
>
> version: PGAdmin III version 1.0.0
> OS: Windows XP Professional SP1
>
> -- postgres --
>
> Postgres: 7.3.4 on i686-pc-linux-gnu
> OS: RedHat Linux 9
>
> - steps to reproduce --
>
> 1. Create table with uppercase characters in name (like
> "tTable") 2. Create index on that table
>
> -- Actual results --
>
> Index is not created
> PGAdmin states that reference "public.ttable" does not exist
>
> -- Expected results --
>
> Index is created
>
> -- Comment --
>
> It looks like the PGAdmin lowercases the table name before
> sending it to
> postgres. If you see the SQL pane when creating the index, the table
> name is correct ("tTable") but in the error message it it lowercased
> ("ttable").
>
> Same error is when the SQL command is copied into SQL query tool.
>
> When the same SQL command is entered on psql command line (on linux),
> the index is created
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
http://www.postgresql.org/docs/faqs/FAQ.html

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Andreas Pflug 2003-10-01 10:56:49 Re: Russian data in SQL_ASCII encoding
Previous Message Моисеев Алексей Николаевич 2003-10-01 09:44:03 Russian data in SQL_ASCII encoding