Re: Planner forces seq scan when select without quoting its values - Mailing list pgsql-general

From Tom Lane
Subject Re: Planner forces seq scan when select without quoting its values
Date
Msg-id 25641.1347544777@sss.pgh.pa.us
Whole thread Raw
In response to Planner forces seq scan when select without quoting its values  (Alex Lai <mlai@sesda2.com>)
Responses Re: Planner forces seq scan when select without quoting its values  (Alex Lai <mlai@sesda2.com>)
List pgsql-general
Alex Lai <mlai@sesda2.com> writes:
>    "EXPLAIN insert into alex1 (fileid, archiveset) select 35352974, 10003;"
> [vs]
>    "EXPLAIN insert into alex1 (fileid, archiveset) select '35352974', '10003';"

You might be happier using INSERT ... VALUES instead of INSERT
... SELECT for this.  In the former, the parser is going to be more
aggressive about forcing values to the correct datatype, which is the
root of your difficulties here.

            regards, tom lane


pgsql-general by date:

Previous
From: Sébastien Lorion
Date:
Subject: Re: Amazon High I/O instances
Next
From: Mike Christensen
Date:
Subject: Re: Where do I get pgAdmin 1.16 for openSuSE?