SchemaAnnotations
DeleteSchemaAnnotation
Delete a schema annotation
Removes a single annotation identified by its natural key. Omit column_name to delete a table-level annotation, and omit schema_name to match the unqualified form.
Usage
err := client.Schemaannotations.DeleteSchemaAnnotation(ctx, "prj_xxx", &pgbeam.DeleteSchemaAnnotationParams{
TableName: "...",
})Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ctx | context.Context | Yes | Request context |
| projectID | string | Yes | Unique project identifier (prefixed, e.g. prj_xxx). |
| params | *pgbeam.DeleteSchemaAnnotationParams | Yes | Query parameters |
| params.TableName | string | Yes | Relation (table or view) the annotation describes. |
| params.SchemaName | string | No | Optional schema. Omit to match the unqualified form. |
| params.ColumnName | string | No | Optional column. Omit to delete a table-level annotation. |
Response
error: returns nil on success.
Example
import pgbeam "go.pgbeam.com/sdk"
client := pgbeam.NewClient(&pgbeam.ClientOptions{
APIKey: "pgb_your_api_key",
})
err := client.Schemaannotations.DeleteSchemaAnnotation(ctx, "prj_xxx", &pgbeam.DeleteSchemaAnnotationParams{
TableName: "...",
SchemaName: "...",
ColumnName: "...",
})
if err != nil {
log.Fatal(err)
}Errors
| Status | Description |
|---|---|
| 400 | Invalid request parameters. |
| 401 | Missing or invalid authentication. |
| 403 | Operation not allowed by current plan limits. |
| 404 | Resource not found. |