Skip to content

Instantly share code, notes, and snippets.

@hooopo
Created May 9, 2019 20:45
Show Gist options
  • Select an option

  • Save hooopo/46fbb35bf4480bd42b4e28cdab2f2b81 to your computer and use it in GitHub Desktop.

Select an option

Save hooopo/46fbb35bf4480bd42b4e28cdab2f2b81 to your computer and use it in GitHub Desktop.

Revisions

  1. hooopo created this gist May 9, 2019.
    5 changes: 5 additions & 0 deletions list index def for table.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    SELECT pg_get_indexdef(indexrelid) FROM pg_index WHERE indrelid = 'public.companies'::regclass AND indisprimary = 'f';
    pg_get_indexdef
    ---------------------------------------------------------------------------------------------------------
    CREATE INDEX index_companies_on_company_edition_id ON public.companies USING btree (company_edition_id)
    CREATE UNIQUE INDEX index_companies_on_uuid ON public.companies USING btree (uuid)