Comment 1991 added to page indexes.html of version 7.4 - Mailing list pgsql-www

From nobody
Subject Comment 1991 added to page indexes.html of version 7.4
Date
Msg-id 200501141533.j0EFXjM7006117@developer.pgadmin.org
Whole thread Raw
List pgsql-www
Author: Andrew Droffner <adroffne@advance.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
INTEGERto 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


pgsql-www by date:

Previous
From: "Dave Page"
Date:
Subject: Re: font size
Next
From: Robert Treat
Date:
Subject: Re: font size