-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] CTAS on PostgreSQL needs commit to apply #8367
Conversation
I think adding the option under |
Update on the issue (Thanks: @rc-ontruck), this can be simply solved by using:
This checks my second option, that I think it's less intrusive. Going to update docs to refer to this |
Codecov Report
@@ Coverage Diff @@
## master #8367 +/- ##
==========================================
+ Coverage 67.57% 67.65% +0.07%
==========================================
Files 448 448
Lines 22527 22498 -29
Branches 2364 2364
==========================================
- Hits 15222 15220 -2
+ Misses 7167 7140 -27
Partials 138 138
Continue to review full report at Codecov.
|
docs/sqllab.rst
Outdated
You can use `CREATE TABLE AS SELECT ...` statements on SQLLab this feature can be toggled on | ||
and off at the database configuration level, note that on PostgreSQL DDL is transactional, | ||
this means that, to properly use this feature you have to set `autocommit` to true on your | ||
engine parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps clarify by explicitly mentioning that CTAS require DML + split up into two sentences to make it easier on the eyes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad; I somehow assumed this was being done as DML, not using the button! The text above sounds good. Not sure if this is overkill, but it might be a good idea to also mention this under docs/installation.rst
where database-specific quirks are listed, or at least a reference from one to the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem, I would say that a small note is not overkill. Just updated it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^ @villebro
* [docs] New, document need for PG to use autocommit for CTAS
CATEGORY
SUMMARY
#8362
CREATE TABLE AS...
on PostgreSQL needs a commit to apply (transactional DDL).This means that the engine parameters need to have
AUTOCOMMIT
so that SQLLab CTAS can work. This is a simple PR to document this exceptionBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION
REVIEWERS
@mistercrunch @villebro