Skip to content

Create component which will create an identifier for Postgres objects like functions, policies, and constraints. #48

@starnowski

Description

@starnowski

Create component which will create identifier for postgres objects like functions, policies and constraints.

PostgresIdentifier.produce(String... args)

Example:

producer.produce("is", "user_id", "from", "tenat") == "is_user_id_from_tenant"

The component should truncate the value to maximum length available in Postgres (by default it is 63 characters).

IMPORTANT!
Create a component that will be able to check the value of NAMEDATALEN and if it's valid with the maximum value set in component responsible for identifier generation.

  • In case when the value is higher than the minimum value then print warning.
  • In case when the value is lower than user in component throw exception.

https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

https://www.postgresql.org/message-id/20041101092011.GA26912%40svana.org

https://til.hashrocket.com/posts/8f87c65a0a-postgresqls-max-identifier-length-is-63-bytes

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