Skip to content

remote_name() for in_schema() etc #1280

Description

@mgirlich

The documentation says

remote_name() gives the name remote table, or NULL if it's a query

But what exactly is meant by "name" when a table is specified via in_schema(), in_catalog() or DBI::Id()?

At the moment remote_name() returns these objects as they are. But from the name I'd rather expect to get a string.

I think:

  • remote_name() should simply return the name of a table, e.g. for in_schema("my schema", "my table") it should return "my table". If the table was created via ident_q() or sql() it returns NULL
  • we add another function remote_table() that returns a table identifier e.g. for in_schema("my schema", "my table") it should return in_schema("my schema", "my table"). If the table was created via ident_q() or sql() it should return them as they are.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions