spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dongjoon Hyun (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (SPARK-22717) Postgres is assumed to cascade truncate table by default which is not true
Date Thu, 07 Dec 2017 05:14:00 GMT

     [ https://issues.apache.org/jira/browse/SPARK-22717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dongjoon Hyun closed SPARK-22717.
---------------------------------

> Postgres is assumed to cascade truncate table by default which is not true
> --------------------------------------------------------------------------
>
>                 Key: SPARK-22717
>                 URL: https://issues.apache.org/jira/browse/SPARK-22717
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.1
>         Environment: Postgres 8,9,10
>            Reporter: Bolke de Bruin
>
> The postgres dialect returns True for isCascadingTruncateTable, which is mentioned to
be returned ([https://github.com/apache/spark/blob/d4107196d59638845bd19da6aab074424d90ddaf/sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala#L152])
to indicate that it cascades by default. This is not true accoriding to the documentation[https://www.postgresql.org/docs/9.1/static/sql-truncate.html]
> {code}
> 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.
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message