-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax highlighting doesn't work when storing mustache files in function definitions #18
Comments
Really nice that this already sparked some discussion! Looks like the final interface will be like this though: \file_read fbody source_file.txt
CREATE FUNCTION foo() RETURNS whatever AS :'fbody' LANGUAGE ...; @wolfgangwalther You mentioned you follow the mailing list daily. I was wondering, what's the protocol on implementing a feature? Should I just jump in with a new patch? Not sure if I should leave that to Tom Lane since he proposed it. |
I don't expect him to work on this. If so, he would likely have said that. I guess you could just write a patch for the above, yes. |
Note that this already works as: \set tpl `cat tpl.mustache`
create function tpl() returns text as :'tpl' language plmustache; On the pg patch we're working on a native way that's not dependent on the shell. |
Problem
As it can be seen on https://github.com/PostgREST/plmustache?tab=readme-ov-file#sections, regular syntax highlighting for mustache files doesn't work.
Solution
Add a
psql
command that can obtain the function body from another file.I've submitted this on https://www.postgresql.org/message-id/CAGRrpzZnoWY-kK_0qK-OY%3D-e0eDqhc5kdFSkuxN0mxe9iuiz0Q%40mail.gmail.com
It can also be tried on this branch https://github.com/steve-chavez/postgresql/tree/cf with:
Alternatives
psql
that deploys the functions based on mustache files.The text was updated successfully, but these errors were encountered: