I am starting out with PostgreSQL and have realised that while working with C# and EF Core I have a set of logic that would work better in a stored procedure in the database. However I've come from a SQL Server background, so writing PL/pgSQL is a whole new ball game to me. I'm trying to create a test procedure below that just takes a string, adds some letters to it, and returns it. But it fails with the error shown in the screenshot. I can't really work out how to resolve this, or even what it's really pointing to. Can anyone assist?
Asked
Active
Viewed 102 times
1
-
1Your SQL client doesn't understand dollar quoting. You will have to use standard SQL quotes (and escaping embedded single quotes by doubling them) – Jun 09 '20 at 06:24
1 Answers
0
Your (unspecified) client software is not hip to PostgreSQL syntax and thinks that the first best semicolon terminates a statement. Use something else.

Laurenz Albe
- 209,280
- 17
- 206
- 263
-
Hmm, fair enough. Am using HeidiSQL which supposedly supports PostgreSQL. Well there you go! – JamesMatson Jun 09 '20 at 05:49
-