public inbox for [email protected]  
help / color / mirror / Atom feed
From: aditya desai <[email protected]>
To: pgsql-sql <[email protected]>
Subject: Create index on user defined type
Date: Tue, 19 Apr 2022 21:57:18 +0530
Message-ID: <CAN0SRDHgW+5-yGdLE-y6eCpWdffV7iexabGL1PmZOb7BU=QeWg@mail.gmail.com> (raw)

Hi,
Is there any way to create index on user defined type in Postgresql? Need
to create index on bug_status in bug table.

CREATE TYPE bug_status AS ENUM ('new', 'open', 'closed');

CREATE TABLE bug (
    id serial,
    description text,
    status bug_status
);

Regards,
Aditya.


view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Create index on user defined type
  In-Reply-To: <CAN0SRDHgW+5-yGdLE-y6eCpWdffV7iexabGL1PmZOb7BU=QeWg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox