what is the table space for the indexes created implicitly?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • osman7king
    New Member
    • Sep 2010
    • 61

    what is the table space for the indexes created implicitly?

    when the primary key constraint created, the pgAdmin implicitly creates the index for the selected column
    but I want to know what is the table space for these
    indexes. I tried to execute the query:
    Code:
     select * from pg_indexes
    but the column "tablespace " appears empty for the implicit
    indexes, what that means?


    and what the difference between "pg_indexes " table and
    "pg_index" table?

    THANKS.
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Read manual.


    Two tablespaces are automatically created by initdb. The pg_global tablespace is used for shared system catalogs. The pg_default tablespace is the default tablespace of the template1 and template0 databases (and, therefore, will be the default tablespace for other databases as well, unless overridden by a TABLESPACE clause in CREATE DATABASE).

    Comment

    • Phil H

      #3
      I did this:
      CREATE TABLE sales (amount integer UNIQUE);

      and got this:
      NOTICE: CREATE TABLE / UNIQUE will create implicit index "sales_amount_k ey" for table "sales"

      in pgAdminIII's query tool.

      Because it's an index, I couldn't select from it.

      ---+
      phil

      Comment

      Working...