Re: temporary indexes? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: temporary indexes?
Date
Msg-id 5627DE7F.1060300@aklaver.com
Whole thread Raw
In response to temporary indexes?  (Jonathan Vanasco <postgres@2xlp.com>)
Responses Re: temporary indexes?  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
On 10/21/2015 11:43 AM, Jonathan Vanasco wrote:
> I couldn't find any mention of this on the archives...
>
> Have the project maintainers ever considered extending CREATE INDEX to support "temporary" indexes like CREATE
TEMPORARYTABLE? 
>
> When creating temporary tables for analytics/reporting, I've noticed that I often need to create (then drop) indexes
onregular tables.  Temporary indexes seemed like a natural fit here, so i was wondering if there was any reason why
they'renot supported (other than no one wanted it!) 

Something like this?:

aklaver@test=> create temporary table temp_test(id int, fld_1 varchar);
CREATE TABLE

aklaver@test=> create index temp_idx on temp_test(fld_1);
CREATE INDEX

aklaver@test=> \d temp_test
       Table "pg_temp_2.temp_test"
  Column |       Type        | Modifiers
--------+-------------------+-----------
  id     | integer           |
  fld_1  | character varying |
Indexes:
     "temp_idx" btree (fld_1)

>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: invalid page in block 1226710 of relation base/16750/27244
Next
From: Ryan King - NOAA Affiliate
Date:
Subject: Re: [ADMIN] $libdir/mysql_fdw