marijnh/Postmodern — Issue #11: S-SQL enhancement: DEFERRED/IMMEDIATE support for :CREATE-TABLE
Author: robwalker01
Created: 2012-02-01 18:00:23+00:00
State: open

Although I see that there is a :SET-CONSTRAINTS operation that is useful for setting constraints as DEFERRED or IMMEDIATE for a particular transaction, what I would like is the ability to have the DEFERRABLE INITIALLY DEFERRED kind of syntax to be returned from the S-SQL:SQL function when using :CREATE-TABLE. It currently doesn't seem to allow you to specify those kinds of details when using :CREATE-TABLE.

My use-case is that I'm specifically using S-SQL as a way to generate SQL queries/statements as a (escaped) string, independent of PostgreSQL. Although my favorite full-fledged DBMS is PostgreSQL, I'm currently trying to use S-SQL to programmatically construct SQL for SQLite, so I'm only wanting the generated SQL queries/statements from S-SQL and not the other Postmodern functionality.

Regardless of this particular use-case, even for PostgreSQL I'd still want to be able to explicitly set these options within the table definitions anyway rather than always using SET CONSTRAINTS. I was just surprised that :ON-DELETE and :ON-UPDATE were directly supported but not concerning setting it as deferrable or immediate.