8000 Support for parameter substitution in BACKUP command · Issue #57125 · cockroachdb/cockroach · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Support for parameter substitution in BACKUP command #57125
Open
@cjireland

Description

@cjireland

Is your feature request related to a problem? Please describe.
We are trying to perform parameter substitution in Java using the postures driver. The BACKUP command (and others) does not support the full range of parameter substitutions.

An example error we received whilst trying to identify this was:

org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [BACKUP TO ? AS OF SYSTEM TIME ?::String WITH revision_history, encryption_passphrase = ?]; ERROR: could not determine data type of
placeholder $2; nested exception is org.postgresql.util.PSQLException: ERROR: could not determine data type of placeholder 

In the end we identified that we needed: BACKUP to ? AS OF SYSTEM TIME '%s'.

Describe the solution you'd like
It should be possible to substitute all parameters in a SQL command whether it be a database name, an S3 bucket or a column/value. It's not just the BACKUP command where this happens. Others include RESTORE, DROP DATABASE and SHOW BACKUP.

Epic CRDB-7909

Jira issue: CRDB-2859

< 42B9 /div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0