Menu

#713 [PostgreSQL] new item renders wrong INSERT when default value is function()

4.7.3
closed-fixed
nobody
None
5
2021-02-08
2019-09-26
No

Adminer v4.7.3. A table with a function - uuid_generate_v1() - as a default value.

CREATE TABLE "public"."tbl" (
    "pkey" uuid DEFAULT uuid_generate_v1() NOT NULL,
    "foo" smallint NOT NULL,
    CONSTRAINT "pkey_tbl" PRIMARY KEY ("pkey")
) WITH (oids = false);

The insert form renders the uuid_generate_v1() as a value into pkey column, which is then interpreted as a string, which obviously fails.

Proposed solution:
1) The <input> should be rendered empty even if there's a default value on respective column.
2) The rendered INSERT should not specify such a column at all (rather than inserting empty string '' - v3.7.3)

thanks
Vojtech

2 Attachments

Discussion

  • Jakub Vrána

    Jakub Vrána - 2019-11-11
    • status: open --> open-accepted
     
  • Jakub Vrána

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

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.