# DROP PUBLICATION

DROP PUBLICATION — remove a publication

### Synopsis

```
DROP PUBLICATION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
```

### Description

`DROP PUBLICATION` removes an existing publication from the database.

A publication can only be dropped by its owner or a superuser.

### Parameters

`IF EXISTS`

Do not throw an error if the publication does not exist. A notice is issued in this case.

*`name`*

The name of an existing publication.

`CASCADE`\
`RESTRICT`

These key words do not have any effect, since there are no dependencies on publications.

### Examples

Drop a publication:

```
DROP PUBLICATION mypublication;
```

### Compatibility

`DROP PUBLICATION` is a PostgreSQL extension.

### See Also

[CREATE PUBLICATION](/15/reference/sql-commands/create-publication.md), [ALTER PUBLICATION](/15/reference/sql-commands/alter-publication.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.postgresql.tw/15/reference/sql-commands/drop-publication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
