From: | Keary Suska <hierophant(at)pcisys(dot)net> |
---|---|
To: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Basic questions about PQprepare() |
Date: | 2006-01-31 18:42:48 |
Message-ID: | C004FDB8.25BEF%hierophant@pcisys.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
on 1/29/06 8:00 PM, mike(at)fuhr(dot)org purportedly said:
> On Sun, Jan 29, 2006 at 06:03:41PM +0100, Joachim Wieland wrote:
>> On Sat, Jan 28, 2006 at 08:26:01PM +0100, Alexander Farber wrote:
>>> Could you explain a bit more, where to get the OIDs?
>>
>> They are in the pg_type table, it is described here:
>>
>> http://www.postgresql.org/docs/8.1/static/catalog-pg-type.html
>
> For standard types you could include server/catalog/pg_type.h and
> use TEXTOID, INT4OID, etc. But as Tom Lane mentioned, if the query
> is written so the backend can infer the types then you don't need
> to bother.
This thread has particular interest to me as well--the libpq documentation
and examples seem to imply that the backend will consider all parameters to
be string literals, although postgres is smart enough to perform
conversions. However, there was an issue (perhaps no longer in 8.x) that in
cases of implicit conversions the planner would have the tendency to perform
sequential searches when otherwise (i.e. when the type is more explicit) it
would do an index search.
My question, then: is this still the case and if so, is there another way to
inform the planner of the type such as explicit type casts? I guess I am
wondering more specifically what "if the query is written so the backend can
infer the types" means.
Thanks,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-01-31 18:56:51 | Re: plpython error logs |
Previous Message | Stephan Szabo | 2006-01-31 18:34:07 | Re: 8.0.3 regexp_replace()... |