这是indexloc提供的服务,不要输入任何密码
Skip to content

ERD Tool - Generate SQL #5577

@OggVorbis69

Description

@OggVorbis69

pgAdmin 4

Desktop mode on Windows 10 Pro x64

Version details

ALLOW_SAVE_PASSWORD = True
ALLOW_SAVE_TUNNEL_PASSWORD = False
APP_COPYRIGHT = "Copyright (C) 2013 - 2022, The pgAdmin Development Team"
APP_ICON = "pg-icon"
APP_NAME = "pgAdmin 4"
APP_RELEASE = 6
APP_REVISION = 16
APP_SUFFIX = ""
APP_VERSION = "6.16"

Script generated from a diagram.

Adding a string value as a default to a TEXT or VARCHAR column results in an INVALID script - the text is not surrounded by ' '.

Example of the generated script:

CREATE TABLE IF NOT EXISTS a.dropme
(
    text_with_defaule text DEFAULT DefaultValue,
    vaarchal_col character varying(33) NOT NULL DEFAULT xxx
); 

Observed:

the DEFAULT values: 'DefaultValue' and 'xxx' are lacking quotes in the generated script resulting in an execution error

Expected:

Executable script

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions