代码之家  ›  专栏  ›  技术社区  ›  phillipwei

Postgresql自动完成?

  •  11
  • phillipwei  · 技术社区  · 14 年前

    有什么东西可以为PostgreSQL提供自动完成功能吗?我正在寻找类似RedGate的SQLPrompt的东西。目前正在使用pgAdmin III的查询工具,但愿意考虑其他查询编辑器。

    3 回复  |  直到 14 年前
        1
  •  12
  •   Dave Aaron Smith    14 年前

    psql拥有它。我在服务器版本8.2.6上使用版本8.2.7

        2
  •  3
  •   Étienne Bersac    7 年前

    你可能会喜欢 pgcli 它为join和其他不错的特性提供了完善。然而,它缺乏一些 \* 帮助者喜欢 \dF... .

    cave> \d appellation
    +-----------+---------+-----------------------------------------------------------+
    | Column    | Type    | Modifiers                                                 |
    |-----------+---------+-----------------------------------------------------------|
    | id        | integer |  not null default nextval('appellation_id_seq'::regclass) |
    | libelle   | text    |  not null                                                 |
    | region_id | integer |                                                           |
    +-----------+---------+-----------------------------------------------------------+
    Indexes:
        "appellation_pkey" PRIMARY KEY, btree (id)
        "appellation_libelle_key" UNIQUE CONSTRAINT, btree (libelle)
    Foreign-key constraints:
        "appellation_region_id_fkey" FOREIGN KEY (region_id) REFERENCES region(id) ON DELETE CASCADE
    Referenced by:
        TABLE "vin" CONSTRAINT "vin_appellation_id_fkey" FOREIGN KEY (appellation_id) REFERENCES appellation(id) ON DELETE CASCADE
    
    Time: 0.006s
    cave> SELECT * FROM appellation JOIN  _
                                          region ON region.id = appellation.region_id     join      
                                          vin ON vin.appellation_id = appellation.id      join      
    

    在本例中,提出了两个与外键对应的连接。

        3
  •  1
  •   jdwyah    12 年前

    选择*from users u join posts p where p.AUTOCOMPLETE

    不支持公共表表达式。

        4
  •  1
  •   Shayan Shafiq Michael Spector    4 年前

    简单回答如下:

    停止尝试并使用此处找到的客户端: pgcli

    我用pip安装,用 >pgcli -Upostgres