mirror of
https://github.com/sasjs/core.git
synced 2026-01-10 10:50:04 +00:00
fix: quoting for instances of reserved words in pgsql
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
@li mp_getconstraints.sas
|
@li mp_getconstraints.sas
|
||||||
|
|
||||||
@param lib libref of the library to create DDL for. Should be assigned.
|
@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
|
@param fref= the fileref to which to write the DDL. If not preassigned, will
|
||||||
be assigned to TEMP.
|
be assigned to TEMP.
|
||||||
@param flavour= The type of DDL to create (default=SAS). Supported=TSQL
|
@param flavour= The type of DDL to create (default=SAS). Supported=TSQL
|
||||||
@@ -86,6 +86,10 @@ quit;
|
|||||||
column_name=catt('[',column_name,']');
|
column_name=catt('[',column_name,']');
|
||||||
constraint_name=catt('[',constraint_name,']');
|
constraint_name=catt('[',constraint_name,']');
|
||||||
%end;
|
%end;
|
||||||
|
%else %if &flavour=PGSQL %then %do;
|
||||||
|
column_name=catt('"',column_name,'"');
|
||||||
|
constraint_name=catt('"',constraint_name,'"');
|
||||||
|
%end;
|
||||||
if first.constraint_name then do;
|
if first.constraint_name then do;
|
||||||
put " ,CONSTRAINT " constraint_name ctype "(" ;
|
put " ,CONSTRAINT " constraint_name ctype "(" ;
|
||||||
put ' ' column_name;
|
put ' ' column_name;
|
||||||
|
|||||||
Reference in New Issue
Block a user