1

I’ve just started with a web host which supports PostgreSQL.

When setting up a database user, I have the choice of the following privileges:

しかく ALTER しかく CREATE しかく DELETE
しかく EXECUTE しかく DROP しかく EVENT
しかく INDEX しかく INSERT SELECT
しかく TRIGGER しかく UPDATE

That doesn’t include TRUNCATE, though it does include more drastic privileges. I plan to include the DELETE,EXECUTE,INSERT,SELECT,UPDATE privileges, but what’s needed to permit TRUNCATE without giving too much away?

asked Jun 18, 2023 at 0:25

1 Answer 1

4

You need to have the TRUNCATE privilege to truncate a table (or be a superuser).

Since PostgreSQL has no INDEX, EVENT, ALTER or DROP privileges, I suspect that you are using a different software.

answered Jun 18, 2023 at 7:04
2
  • I think you’re right. The DBMS is definitely PostgreSQL, as I can connect to it and the code runs properly. However their web interface to the user info appears to be incorrect, presumably set for MySQL. I have lodged a support request with them, and they acknowledge that it’s wrong. I’ll get back. Commented Jun 19, 2023 at 1:02
  • 1
    @Manngo could you include the name of the interface in the tags/question? Also if the support request is public (e.g. git-issue) it be also worth including. Commented Jun 19, 2023 at 8:58

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.