Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/19911#discussion_r155334735
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala ---
@@ -100,5 +100,5 @@ private object PostgresDialect extends JdbcDialect {
}
- override def isCascadingTruncateTable(): Option[Boolean] = Some(true)
+ override def isCascadingTruncateTable(): Option[Boolean] = Some(false)
--- End diff --
I've looked at your test case again. `fix` is not a decendant table of
`info`, it's a parent table.
```
domino=> truncate domino.info;
ERROR: cannot truncate a table referenced in a foreign key constraint
DETAIL: Table "fix" references "info".
HINT: Truncate table "fix" at the same time, or use TRUNCATE ... CASCADE.
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]