By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 709 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

what is the table space for the indexes created implicitly?

P: 61
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:
Expand|Select|Wrap|Line Numbers
  1.  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.
Oct 11 '10 #1

✓ answered by rski

Read manual.

http://www.postgresql.org/docs/8.1/s...blespaces.html
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).
http://www.postgresql.org/docs/8.3/i...g-indexes.html
http://www.postgresql.org/docs/8.3/i...-pg-index.html

Share this Question
Share on Google+
2 Replies


Expert 100+
P: 700
Read manual.

http://www.postgresql.org/docs/8.1/s...blespaces.html
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).
http://www.postgresql.org/docs/8.3/i...g-indexes.html
http://www.postgresql.org/docs/8.3/i...-pg-index.html
Oct 11 '10 #2

P: n/a
I did this:
CREATE TABLE sales (amount integer UNIQUE);

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

in pgAdminIII's query tool.

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

---+
phil
Oct 11 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.