Re: Scripting function definitions as SQL?

Поиск
Список
Период
Сортировка
От Postgres User
Тема Re: Scripting function definitions as SQL?
Дата
Msg-id b88c3460805111208t63736a4w50e2eeb5aab6e52a@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Scripting function definitions as SQL?  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-general
Yes, but I'm doing this from a Delphi program in Windows and that's
why I'm looking for a solution that's SQL-based.

It would be nice if one of the system catalog views handled it.

> hmmm .. "additional coding" seems a bit too much for a simple thing like
> this:
> pg_dump -s | perl -ne 'print if /^CREATE FUNCTION test_it/../^\s+LANGUAGE/'
>
> of course it would be cool to have switch to do it, but hey - it hardly
> even qualifies as one-liner. it's more "an expression" than code.

On Sun, May 11, 2008 at 11:43 AM, hubert depesz lubaczewski
<depesz@depesz.com> wrote:
> On Sun, May 11, 2008 at 11:28:37AM -0700, Postgres User wrote:
> > Unfortunately I didn't see a way to tell pg_dump to dump only objects
> > of a specific type, like functions or sequences.  It requires
> > additional coding to parse the output and that's less than ideal...
>
> hmmm .. "additional coding" seems a bit too much for a simple thing like
> this:
> pg_dump -s | perl -ne 'print if /^CREATE FUNCTION test_it/../^\s+LANGUAGE/'
>
> of course it would be cool to have switch to do it, but hey - it hardly
> even qualifies as one-liner. it's more "an expression" than code.
>
>
> --
> quicksil1er: "postgres is excellent, but like any DB it requires a
> highly paid DBA.  here's my CV!" :)
> http://www.depesz.com/ - blog dla ciebie (i moje CV)
>

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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Scripting function definitions as SQL?
Следующее
От: Francisco Reyes
Дата:
Сообщение: Making sure \timing is on