Search Postgresql Archives

Re: Planner forces seq scan when select without quoting its values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alex Lai <mlai@xxxxxxxxxx> 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux