This appears to be a potential defect, especially you can reproduce all the time. If that is the case, suggest create a SR with GCS for further investigation. I assume you run the DDL from sql developer, you got the same oracle error, right?
We ran into an issue while packaging Data-Admin-Db-Table rule which points to a View in Postgres. The generated XML corresponding to view is not compatible with Db2 & Oracle as it contains Postgres specific syntax ( ::text ). We have seen similar issue been discussed in mesh post here and as per this, it’s fixed in Pega 7.2. But still we are facing the same problem in Pega 7.2.
Pega Version: Pega 7.2 GA
Postgres Version: 9.3.11
Please find the view script/jar in the attachment.