Menu

#768 [PostgreSQL 10] Export sequences and indexes

Git
closed-fixed
nobody
PostgreSQL (42)
5
2025-02-26
2020-11-11
LacaK
No

Adminer exports some sequences as:
CREATE SEQUENCE authmap_aid_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START CACHE 1;

after "START" there is missing value!

And some indexes, which contain function like substr() are exported as (see empty ""):

CREATE INDEX "locales_source_source_context_idx" ON "public"."locales_source" USING btree ("", "context");

CREATE INDEX "locales_source_textgroup_context_idx" ON "public"."locales_source" USING btree ("textgroup", "");

should be:

CREATE INDEX "locales_source_source_context_idx" ON "public"."locales_source" USING btree (substr(source, 1, 30), context);

CREATE INDEX "locales_source_textgroup_context_idx" ON "public"."locales_source" USING btree (textgroup, substr((context)::text, 1, 50));

Discussion

  • Jakub Vrána

    Jakub Vrána - 2021-02-08
    • status: open --> open-accepted
     
  • Jakub Vrána

    Jakub Vrána - 2021-02-08

    I've fixed the missing value after START. Indexes are more complicated, Adminer supports only basic column indexes.

     
  • LacaK

    LacaK - 2022-10-28

    For indexes there is full definition of index in "indexdef" column of "pg_indexes" table.
    Cann't you use it?
    (for example when I export structure of Drupal tables I am not able to import them ...)

     

    Last edit: LacaK 2022-10-28
  • Jakub Vrána

    Jakub Vrána - 2025-02-26
    • status: open-accepted --> closed-fixed
     
  • Jakub Vrána

    Jakub Vrána - 2025-02-26

    Fixed by 9aaa4295.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.