8000 Binary is a reserved word in Postgres and so maybe others · Issue #13 · Suor/sql-bricks-postgres · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Binary is a reserved word in Postgres and so maybe others #13
Closed
@christiaanwesterbeek

Description

@christiaanwesterbeek

In contrast to the reserved words in sql-bricks https://github.com/CSNW/sql-bricks/blob/master/sql-bricks.js#L1001, I think sql-bricks-postgres needs a variant to that list.

For example, this:

const update = require('sql-bricks-postgres').update
const { text, values } = update('data.file', {binary: <Buffer 49 44 ... >}).where('id', 1).toParams()

// text --> UPDATE data.file SET binary = $1 WHERE id = $2
// values: [  <Buffer 49 44 ... >, 1 ]
await pg_client.query(text, values)

Fails with this error:

syntax error at or near "binary"

Or should I direct this issue at sql-bricks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0