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

Support for multiple tables in truncate #440

Open
slipset opened this issue Nov 7, 2022 · 0 comments
Open

Support for multiple tables in truncate #440

slipset opened this issue Nov 7, 2022 · 0 comments
Assignees
Labels
enhancement needs analysis I need to think about this!

Comments

@slipset
Copy link

slipset commented Nov 7, 2022

It seems to me from the examples bit of the postgres docs for truncate that postgres accepts multiple tables to truncate, whereas honey does not?

=# create table t1 (id int);
CREATE TABLE
=# create table t2 (id int);
CREATE TABLE
=# insert into t1 values (1);
INSERT 0 1
=# insert into t2 values (2);
INSERT 0 1
=# select * from t1;
 id
----
  1
(1 row)

=# select * from t2;
 id
----
  2
(1 row)

=# truncate t1, t2;
TRUNCATE TABLE
=# select * from t1;
 id
----
(0 rows)

=# select * from t2;
 id
----
(0 rows)

=#

It would be nice if honeysql supported this. Not at all important, as workarounds are available :)

@seancorfield seancorfield self-assigned this Nov 7, 2022
@seancorfield seancorfield added enhancement needs analysis I need to think about this! labels Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement needs analysis I need to think about this!
Projects
None yet
Development

No branches or pull requests

2 participants