Exported DDL statement has end of line characters

My DDL parser (used to convert DDL from Postgres to Huawei and Google technology supported stack) unfortunatelly is only capable to work with single line statements. So I expected VP to export DDL without “formatted” checkbox in a way of statements per line, but VP is probably formatting the output DDL statement on UI to fit into the text box (not sure about this). Still the result copy/paste TEXT of all DDL statements resulted in being create statements (which are very long) being split into multiple lines:
CREATE TABLE asdkdfkjf (column text \n
, column bool);

This way I am not able to parse. I consider this as bug, as if i want multiple line statements I have option “formatted”. What do you think?

Hi,

I tested but cannot reproduce the problem.
Are you using DB > Generate Database… to generate DDL to file?
I don’t understand what you mean “copy/paste TEXT of all DDL statements resulted in being create statements”, do you mean copy from Generate SQL dialog?

Hi @Kit.So,

When I am in Physical ERD diagram and via context menu access Utilities -> Generate SQL, the produced DDL lines are split by “\n” character even when I uncheck formating option.

Hi,

I testd all statements are single line:

And you can save to file instead of copy and paste.
You can also generate DDL by DB > Generate Database…

Hm, I will retest, I think I have some super long statements (50-70 columns is not an issue…), thx for your time @Kit.So

@Kit.So - actually when some column name has default value, then this error occurs. When no default, it all fine.

Hi,

I still cannot reproduce the problem with default value.


Is your default value contains new line?

Hm, thx for checking, I will dig more into this on my side and try to reproduce on some model which I can share here. Thx Kit