Re: psql: add \create_function command

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: psql: add \create_function command
Дата
Msg-id CAFj8pRAsc000HPXVPozNJSAftMnShG_YwXyvGbEHGRq0RhvZTw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql: add \create_function command  (walther@technowledgy.de)
Ответы Re: psql: add \create_function command  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers


pá 26. 1. 2024 v 20:45 odesílatel <walther@technowledgy.de> napsal:
Pavel Stehule:
> looks a little bit obscure - why do you need to do it from psql? And how
> frequently do you do it?

I store all my SQL code in git and use "psql -e" to "bundle" it into an
extension, which is then deployed to production.

this is good way
 

The code is spread over many files, which include other files via \ir.
Sometimes you need to include other types of files, though - for example
code in other languages as Steve mentioned, but I have also had cases
for yaml files, markdown templates, even binary assets which should
still be considered "code" and not data.

So anything in that direction would help.

but why you need to do in psql? - you can prepare content outside and execute just like echo "CREATE FUNCTION ...." | psql

 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: psql: add \create_function command
Следующее
От: Tom Lane
Дата:
Сообщение: Re: psql: add \create_function command