Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

table("public.my_table").drop() does not work #1982

@olavloite

Description

@olavloite

Dropping a table by calling the following will fail when using PostgreSQL:

const instance = spanner.instance('my-instance');
const database = instance.database('my-database');
const table = database.table('public.Singers');
table.delete();

The reason is that this line fails to take two things into consideration:

  1. PostgreSQL uses " (double quotes) to quote identifiers, and not ` (backtick).
  2. If the table name is prefixed with a schema name, then the entire string is quoted, instead of the schema name and table name separately.

The output is:

  • Current: DROP TABLE `public.Singers`
  • Expected: DROP TABLE "public"."Singers"

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/nodejs-spanner API.priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions