Hacker News new | ask | show | jobs
by radiowave 1572 days ago
Off the top of my head, the exception to this is functions (i.e. that you declare inside Postgres), because the function body is really just a piece of text, in any of a bunch of different languages. So if you have a function which refers to specific database objects that are being renamed, you'll also need to update the function definition with the new names.
1 comments

Note that SQL-standard bodies are supported as of 14 [1]:

    Allow SQL-language functions and procedures to use SQL-standard function bodies (Peter Eisentraut)

    Previously only string-literal function bodies were supported. When writing a function or procedure in SQL-standard syntax, the body is parsed immediately and stored as a parse tree. This allows better tracking of function dependencies, and can have security benefits.
[1]: https://www.postgresql.org/docs/14/release-14.html
can you declare and modify string literal functions inside sql standard functions?

if so that's form interpretation right, you could build a powerful lisp-style macro system that way I think.

Ah, that's good news. Thanks.