Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6377359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:51:38+00:00 2026-05-25T01:51:38+00:00

I want to examine an index (and other objects) from psql. I created the

  • 0

I want to examine an index (and other objects) from psql.

I created the index with:

CREATE INDEX my_index on "my_table" (iso_country_code, type_name, UPPER(name) varchar_pattern_ops);

In psql I used the describe command:

db=> \d+ my_index
Index "public.my_index"
      Column      |          Type          | Storage  | Description 
------------------+------------------------+----------+-------------
 iso_country_code | character varying(3)   | extended | 
 type_name        | character varying(300) | extended | 
 pg_expression_3  | text                   | extended | 
btree, for table "public.my_table"

The expression in the last field of the index says only pg_expression_3. Why does the expression not show up in the psql output?

I can retrieve the table schema including the CREATE INDEX statements using pg_dump:

pg_dump --table my_table --schema-only my_db
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:51:40+00:00Added an answer on May 25, 2026 at 1:51 am

    It’s clearly pre-9.0 behaviour, take a look into E.5. Release 9.0:

    • Show definitions of index columns in \d index_name (Khee Chin)

      The definition is useful for expression indexes.

    For previous versions you can still fetch expression manually traversing system catalogs and using pg_get_indexdef(index_oid, column_no, pretty_bool) function, e.g.:

    => SELECT oid FROM pg_catalog.pg_class c WHERE c.relname LIKE 'my_index';
      oid  
    -------
     25240
    (1 row)
    => SELECT attname, attnum FROM pg_attribute a WHERE a.attrelid = '25240';
         attname      | attnum 
    ------------------+--------
     iso_country_code |      1
     type_name        |      2
     pg_expression_3  |      3
    (3 rows)
    => SELECT pg_get_indexdef(25240, 3, true);
     pg_get_indexdef 
    -----------------
     upper(name)
    (1 row)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to examine exactly how my code operates when using other libraries to
I have implemented Examine in an Umbraco project and have created an index of
My question is exactly that but in context I want to examine the selection
I want to debug my tests, to examine every test to see where exactly
Actually i want that, suppose i have a colorcode #FF3366. How can i examine
Want to run javascript function from parent window in child window Example I have
Want to open firefox from terminal at linux with firebug enabled // Terminal $
Want to be able to provide a search interface for a collection of objects
My question is: How to scrape data from this website http://vtis.vn/index.aspx But the data
I want to examine a NMR spectre and make the best fit of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.