Skip to content
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

Fix create table as problem. Support without TEMP. #149

Merged
merged 6 commits into from
Nov 11, 2019

Conversation

emin100
Copy link
Contributor

@emin100 emin100 commented Jul 7, 2019

CREATE TABLE films_recent AS
SELECT * FROM films WHERE date_prod >= '2002-01-01'

CREATE TEMP TABLE films_recent AS
SELECT * FROM films WHERE date_prod >= '2002-01-01'

Added ON COMMIT part

ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP }

mehmet emin karakas added 4 commits July 1, 2019 14:26
CREATE DOMAIN us_postal_code AS TEXT
CHECK(
   VALUE ~ '^\d{5}$'
OR VALUE ~ '^\d{5}-\d{4}$'
);
CREATE TABLE films_recent AS
  SELECT * FROM films WHERE date_prod >= '2002-01-01'

CREATE TEMP TABLE films_recent AS
    SELECT * FROM films WHERE date_prod >= '2002-01-01'
ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP }
@lfittl
Copy link
Member

lfittl commented Nov 11, 2019

@emin100 Same for this - could we add tests here?

CREATE TEMP TABLE films_recent WITH (OIDS) ON COMMIT DROP AS SELECT * FROM films WHERE date_prod > $1;

CREATE TABLE films2 AS TABLE films;
@emin100
Copy link
Contributor Author

emin100 commented Nov 11, 2019

Test is added

@lfittl lfittl merged commit 3fd87b9 into pganalyze:master Nov 11, 2019
@emin100 emin100 deleted the create_table_as branch December 28, 2020 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants