Re: [DOCS] nothing ever works
От | Joe Conway |
---|---|
Тема | Re: [DOCS] nothing ever works |
Дата | |
Msg-id | bbf66634-3fc5-06d4-baee-64f3b198197e@joeconway.com обсуждение исходный текст |
Ответ на | Re: [DOCS] nothing ever works (Gerard Matthews <gerardmatt@gmail.com>) |
Ответы |
Re: [DOCS] nothing ever works
|
Список | pgsql-docs |
On 06/22/2017 04:29 AM, Gerard Matthews wrote: > It's under this page on the > docs https://www.postgresql.org/docs/9.1/static/ecpg-dynamic.html. Perhaps a bit confusing but notice the title in the top middle of the page: "Chapter 33. ECPG - Embedded SQL in C" That is definitely not what you are looking for by the sound of it. As others have pointed out, most likely you want plpgsql: https://www.postgresql.org/docs/current/static/plpgsql.html although you can also write dynamic SQL in other Procedural Languages which ship with Postgres, for example plpython and plperl: https://www.postgresql.org/docs/current/static/plpython.html https://www.postgresql.org/docs/current/static/plperl.html Note however, while plpgsql is installed into your database by default, plperl and plpython are not, so you would have to log into the database of interest and run the following (once), e.g. (only do for the language of interest, not all three; also note that depending on how you installed Postgres, you might need to also install extra packages): CREATE EXTENSION plperl; CREATE EXTENSION plpythonu; CREATE EXTENSION plperlu; Also note the difference between "trusted" and "untrusted" procedural languages. plpgsql and plperl are "trusted" while plperlu and plpythonu are "untrusted". See this link for an explanation: https://www.postgresql.org/docs/current/static/plperl-trusted.html Hope this helps. Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development
Вложения
В списке pgsql-docs по дате отправления: