Replies: 1 comment 1 reply
-
Not positive what you are asking for, but if you have a trigger function and want to get row data for the table the trigger was on you use new.col or old.col. Old is for existing data, and New is data to be inserted or updated. edit: If you asking about how to format the actual string, I used concatenation the time I needed it but there is Format function: https://www.postgresqltutorial.com/postgresql-format/ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm looking for a solution to populate template strings with values from a row.
For a string that contains a variable
"Hello { user.name }"
I want to populate it with the data. Resulting in"Hello LyMc"
.For template syntax, it can be anything, like
{ user.name }
,${ user.name }
,{{ user.name }}
...I need to do it in a trigger.
A template string can contain zero or more variables. All have to be populated.
What options do I have?
Beta Was this translation helpful? Give feedback.
All reactions