Обсуждение: PL/pgSQL

Поиск
Список
Период
Сортировка

PL/pgSQL

От
Jim Beckstrom
Дата:
Is there a way to import PL/pgSQL modules that are created outside of Postgres into a Postgres database?

Thanks,
Jim

Re: PL/pgSQL

От
Michael Fuhr
Дата:
On Fri, Dec 02, 2005 at 04:21:12PM -0800, Jim Beckstrom wrote:
> Is there a way to import PL/pgSQL modules that are created outside
> of Postgres into a Postgres database?

Whatever client you're using should allow you to import commands
from a file.  For example, if you're using psql you could pipe or
redirect standard input or use the -f option:

some_command | psql
psql < filename
psql -f filename

You can also import a file from the psql prompt:

\i filename

For more information see the psql documentation or the documentation
for whatever client you're using.  If that doesn't help then please
be more specific about what you're trying to do.

--
Michael Fuhr