1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-03 15:40:05 +00:00

fix: quoting for instances of reserved words in pgsql

This commit is contained in:
vrh
2020-08-04 18:13:22 +02:00
parent e3f6cb7b45
commit 8beec7dc19

View File

@@ -19,7 +19,7 @@
@li mp_getconstraints.sas
@param lib libref of the library to create DDL for. Should be assigned.
@param ds dataset to create ddl for
@param ds dataset to create ddl for (optional)
@param fref= the fileref to which to write the DDL. If not preassigned, will
be assigned to TEMP.
@param flavour= The type of DDL to create (default=SAS). Supported=TSQL
@@ -86,6 +86,10 @@ quit;
column_name=catt('[',column_name,']');
constraint_name=catt('[',constraint_name,']');
%end;
%else %if &flavour=PGSQL %then %do;
column_name=catt('"',column_name,'"');
constraint_name=catt('"',constraint_name,'"');
%end;
if first.constraint_name then do;
put " ,CONSTRAINT " constraint_name ctype "(" ;
put ' ' column_name;