hasura / hasura/graphql-engine
Improve SQL triggers documentation, remove "emp_stamp"
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
https://github.com/hasura/graphql-engine/blob/659b340ffa299a00085b1445841db7e7d352323e/docs/docs/schema/postgres/default-values/sql-functions.mdx?plain=1#L109
`$emp_stamp$` appears to have been taken from the [PostgreSQL documentation](https://www.postgresql.org/docs/current/plpgsql-trigger.html#PLPGSQL-TRIGGER-EXAMPLE), but doesn't have meaning for the example in the Hasura documentation.
I.e., `emp_stamp`, meaning "employee stamp", isn't a relevant name for the "upper" insert trigger in the Hasura docs. However, a newcomer to SQL may assume that the name used in the [dollar-quote](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING) is somehow important.
Perhaps instead use `$$` considering it is unlikely that users will need to use multiple tagged dollar-quotes at the same time.
Contributor guide
Research direction
Open docs/docs/schema/postgres/default-values/sql-functions.mdx at the linked line and compare the trigger example with PostgreSQL's dollar-quoting guidance. Replace the irrelevant emp_stamp tag with the documented simpler form, then verify the example remains valid and no longer suggests the tag has special meaning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, sql
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100