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

Create script invalid when role contain some character like "-" #7737

@tomamplius

Description

@tomamplius

Describe the bug

image
WORK

GRANT SELECT ON TABLE public.archive_payables TO "interface-ro";

NOT WORK

REVOKE ALL ON TABLE public.archive_payables FROM interface-ro;

On the revoke part role name need " like in the grant part

To Reproduce

1 Create role with "-" in the name
2 Create table with grant to this user
3 ask the create script

Expected behavior

add "" arround the role name on revoke part like in GRANT part

REVOKE ALL ON TABLE public.archive_payables FROM interface-ro;

become

REVOKE ALL ON TABLE public.archive_payables FROM "interface-ro";

Error message

ERROR:  syntax error at or near "-"
LINE 1: ...VOKE ALL ON TABLE public.archive_payables FROM interface-ro;
                                                                   ^ 

État SQL : 42601
Caractère : 59
  • Version: 8.9
  • Mode: Server
  • Browser : firefox
  • Package type: DEB

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions