PgBeam
PgBeam Docs
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

ParameterTypeRequiredDescription
ctxcontext.ContextYesRequest context
projectIDstringYesUnique project identifier (prefixed, e.g. prj_xxx).
params*pgbeam.DeleteSchemaAnnotationParamsYesQuery parameters
params.TableNamestringYesRelation (table or view) the annotation describes.
params.SchemaNamestringNoOptional schema. Omit to match the unqualified form.
params.ColumnNamestringNoOptional 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

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403Operation not allowed by current plan limits.
404Resource not found.

On this page