SQLStatistics problem

SQLStatistics problem

am 23.08.2006 22:04:35 von Blake McBride

--=====================_21254937==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed


Greetings,

I am having a problem with SQLStatistics. I am using Hiroshi Inoue's
latest ODBC DLL's, PostgreSQL 8.1.2, all on Windows XP.

I issued the following SQL statements:


ALTER TABLE ONLY rights
ADD CONSTRAINT rights_id_key UNIQUE (id);


CREATE UNIQUE INDEX blake ON rights (deny_flag);

When I do a dump of the database the two statements create different
results as I would expect. By "different results" I mean the dump uses
different commands to re-create each of those things. One is a constraint
and the other an index.

When I use ODBC SQLStatistics I get back records for each of those statements
but there is no way to distinguish the constraint from the index.

Any help would be appreciated.

Sincerely,

Blake McBride
blake@mcbride.name

--=====================_21254937==.ALT
Content-Type: text/html; charset="us-ascii"





Greetings,


I am having a problem with SQLStatistics.  I am using Hiroshi
Inoue's

latest ODBC DLL's, PostgreSQL 8.1.2, all on Windows
XP.


I issued the following SQL statements:




ALTER TABLE ONLY rights

    ADD CONSTRAINT rights_id_key UNIQUE (id);




CREATE UNIQUE INDEX blake ON rights (deny_flag);


When I do a dump of the database the two statements create different

results as I would expect.  By "different results" I mean
the dump uses

different commands to re-create each of those things.  One is a
constraint

and the other an index.


When I use ODBC SQLStatistics I get back records for each of those
statements

but there is no way to distinguish the constraint from the
index.


Any help would be appreciated.


Sincerely,


Blake McBride

blake@mcbride.name




--=====================_21254937==.ALT--

Re: SQLStatistics problem

am 24.08.2006 15:22:50 von Hiroshi Inoue

Blake McBride wrote:
>
> Greetings,
>
> I am having a problem with SQLStatistics. I am using Hiroshi Inoue's
> latest ODBC DLL's, PostgreSQL 8.1.2, all on Windows XP.
>
> I issued the following SQL statements:
>
>
> ALTER TABLE ONLY rights
> ADD CONSTRAINT rights_id_key UNIQUE (id);
>
>
> CREATE UNIQUE INDEX blake ON rights (deny_flag);
>
> When I do a dump of the database the two statements create different
> results as I would expect. By "different results" I mean the dump uses
> different commands to re-create each of those things. One is a constraint
> and the other an index.
>
> When I use ODBC SQLStatistics I get back records for each of those
> statements
> but there is no way to distinguish the constraint from the index.
>
> Any help would be appreciated.

One way seems to be to check the existence of pg_constraint data
whose name = the index_name.

regards,
Hiroshi Inoue





---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match