Thread: Explain Bug in PgAdmin III Query window

Explain Bug in PgAdmin III Query window

From
Kevin.Wilson@comtrol.com
Date:
<p><font size="2">Server = PostgreSQL v7.4.2 on SuSE Linux 9.1</font><br /><font size="2">PgAdminIII v1.1.0 Devel(Apr
142004) on Windows 2000-sp4</font><p><font size="2">Using the ddl created by the create table & index UI wizards I
thenpost that ddl into the query window and hit explain. I receive and error message that some syntax is
invalid.</font><p><fontsize="2">These were generated using PgAdminIII:</font><p><font size="2">CREATE TABLE
"INDEODB"."COMPANY"</font><br/><font size="2">(</font><br /><font size="2">  "COMPANY_ID" numeric(10) NOT
NULL,</font><br/><font size="2">  "COM_NAME" varchar(40),</font><br /><font size="2">  CONSTRAINT "COMPANY_pkey"
PRIMARYKEY ("COMPANY_ID")</font><br /><font size="2">) WITHOUT OIDS;</font><p><font size="2">CREATE INDEX
"IDX_COMPANY_COM_NAME"</font><br/><font size="2">  ON "INDEODB"."COMPANY"</font><br /><font size="2">  USING
btree</font><br/><font size="2">  ("COM_NAME");</font><p><font size="2">output of explain on create table
is:</font><p><fontsize="2">Query inserted one rows with OID 0.</font><br /><font size="2">ERROR:  syntax error at or
near"numeric" at character 59</font><p><font size="2">output of explain on create index is:</font><p><font
size="2">Queryinserted one rows with OID 0.</font><br /><font size="2">ERROR:  syntax error at or near "INDEX" at
character16</font><br /><p><font size="2">The real execution of these work fine.</font><p><font
size="2">Thanks,</font><p><fontsize="2">Kevin</font> 

Re: Explain Bug in PgAdmin III Query window

From
Andreas Pflug
Date:
Kevin.Wilson@comtrol.com wrote:

> Server = PostgreSQL v7.4.2 on SuSE Linux 9.1
> PgAdminIII v1.1.0 Devel(Apr 14 2004) on Windows 2000-sp4
>
> Using the ddl created by the create table & index UI wizards I then 
> post that ddl into the query window and hit explain. I receive and 
> error message that some syntax is invalid.
>
> These were generated using PgAdminIII:
>
> CREATE TABLE "INDEODB"."COMPANY"
> (
>   "COMPANY_ID" numeric(10) NOT NULL,
>   "COM_NAME" varchar(40),
>   CONSTRAINT "COMPANY_pkey" PRIMARY KEY ("COMPANY_ID")
> ) WITHOUT OIDS;
>
> CREATE INDEX "IDX_COMPANY_COM_NAME"
>   ON "INDEODB"."COMPANY"
>   USING btree
>   ("COM_NAME");
>
> output of explain on create table is:
>
> Query inserted one rows with OID 0.
> ERROR:  syntax error at or near "numeric" at character 59
>
> output of explain on create index is:
>
> Query inserted one rows with OID 0.
> ERROR:  syntax error at or near "INDEX" at character 16
>
>
> The real execution of these work fine.
>

There's nothing to explain on CREATE TABLE or any other DDL command; 
pgsql's error message is misleading.

Regards,
Andreas