Skip to content

sql/plpgsql: report telemetry for the %TYPE / %ROWTYPE hint#169593

Open
rafiss wants to merge 1 commit intocockroachdb:masterfrom
rafiss:fix-plpgsql-link
Open

sql/plpgsql: report telemetry for the %TYPE / %ROWTYPE hint#169593
rafiss wants to merge 1 commit intocockroachdb:masterfrom
rafiss:fix-plpgsql-link

Conversation

@rafiss
Copy link
Copy Markdown
Collaborator

@rafiss rafiss commented May 1, 2026

The PL/pgSQL parser falls back to a heuristic error when type parsing fails and the type expression contains a %; the user is shown a hint suggesting they may have attempted to use %TYPE or %ROWTYPE. The old code attached an issue link to the error via errors.WithIssueLink but did not annotate it with errors.WithTelemetry, so this site produced no telemetry signal.

Switch to unimp.NewWithIssue(114676, ...), which both attaches the issue link and registers a telemetry counter, so future unimplemented-feature pulls bucket these errors under unimplemented.#114676 instead of being invisible.

Informs: #114676
Epic: CRDB-63280

Release note: None

The PL/pgSQL parser falls back to a heuristic error when type parsing
fails and the type expression contains a `%`; the user is shown a hint
suggesting they may have attempted to use `%TYPE` or `%ROWTYPE`. The
old code attached an issue link to the error via `errors.WithIssueLink`
but did not annotate it with `errors.WithTelemetry`, so this site
produced no telemetry signal.

Switch to `unimp.NewWithIssue(114676, ...)`, which both attaches the
issue link and registers a telemetry counter, so future
unimplemented-feature pulls bucket these errors under
`unimplemented.cockroachdb#114676` instead of being invisible.

Informs: cockroachdb#114676
Epic: CRDB-63280

Release note: None
@rafiss rafiss requested a review from bghal May 1, 2026 21:40
@rafiss rafiss requested a review from a team as a code owner May 1, 2026 21:40
@rafiss rafiss added backport-25.4.x Flags PRs that need to be backported to 25.4 backport-26.1.x Flags PRs that need to be backported to 26.1 backport-26.2.x Flags PRs that need to be backported to 26.2 labels May 1, 2026
@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented May 1, 2026

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-25.4.x Flags PRs that need to be backported to 25.4 backport-26.1.x Flags PRs that need to be backported to 26.1 backport-26.2.x Flags PRs that need to be backported to 26.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants