Re: WIP Patch: Use sortedness of CSV foreign tables for query planning

Kevin Grittner <kevin.grittner@wicourts.gov>

From: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
To: "Etsuro Fujita" <fujita.etsuro@lab.ntt.co.jp>, "'PostgreSQL-development'" <pgsql-hackers@postgresql.org>
Date: 2012-08-02T16:28:53Z
Lists: pgsql-hackers
"Etsuro Fujita" <fujita.etsuro@lab.ntt.co.jp> wrote:
 
> I would like to propose single-column sortedness options and
> insert appropriate pathkeys into the ForeignPath node based on
> these information:
> 
>  sorted: Boolean option to specify whether data file is sorted by
>      a column.
>  key: Specifies the name of a column by which data file is sorted.
>      Required when the above option is set to true.
>  direction: Specifies the sort order: asc or desc.  The default is
>      asc.
>  nulls: Specifies that nulls sort before or after non-nulls: first
>      or last.  first is the default when direction option is set
>      desc.  When direction option is not set desc, last is the
>      default.
 
For character-based columns, don't we need to know the collation?
 
-Kevin