From: | nobody <nobody(at)developer(dot)pgadmin(dot)org> |
---|---|
To: | pgsql-www(at)postgresql(dot)org |
Subject: | Comment 1991 added to page indexes.html of version 7.4 |
Date: | 2005-01-14 15:33:45 |
Message-ID: | 200501141533.j0EFXjM7006117@developer.pgadmin.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-www |
Author: Andrew Droffner <adroffne(at)advance(dot)net>
----
Andrew Nurcahya's comment above applies to any SQL plan.
The Postgres server's parser seems to choose a constant's datatype out-of-context. The string [1234] is SQL text is an INTEGER to the planner. A ['1234'] with quotes is text, and gets properly cast to BIGINT to match the left-side of [item_number=1234].
It looks like the server plans BEFORE it promotes constants to the right datatype.
A PREPAREd statment should find the index too. It requires the datatypes of parameters to be declared.
----
Manual page: http://wwwmaster.postgresql.org/docs/7.4/interactive/indexes.html
Reject: http://wwwmaster.postgresql.org/admin/comments.php?action=reject&id=1991
Edit: http://wwwmaster.postgresql.org/admin/comment-edit.php?id=1991
Delete: http://wwwmaster.postgresql.org/admin/comments.php?action=delete&id=1991
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Treat | 2005-01-14 17:20:05 | Re: font size |
Previous Message | Dave Page | 2005-01-14 14:54:09 | Re: font size |