Re: psql scripting tutorials - Mailing list pgsql-general

From Blazej
Subject Re: psql scripting tutorials
Date
Msg-id 819df3760809121337o4fc71affn34e39b485154af7f@mail.gmail.com
Whole thread Raw
In response to Re: psql scripting tutorials  (Artacus <artacus@comcast.net>)
List pgsql-general
> Ok then. Does anyone have any tips or best practices for scripting psql?
>
> I'll probably write some bash scripts to pull csv files over then script
> psql to do a COPY into an import schema then run a pl/pgsql procedure, er
> function, to do all ETL.
>
> Who else is doing something like this? Can psql access environmental
> variables or command line params? Or do I have to have my bash script write
> a psql script every time?
>

Maybe you should try pltcl/pltclu - it's very powerfull (and my
favorite) language for ETL  within PostgreSQL server (read files, TCP,
regular expresion etc.). If you have XWindow based boxes you may use
tk package and even to use graphical user interface (for example
DialogBox as parameters input) on remotex boxes from pltclu (sometimes
I do that).

For external ETL I am using Java Eclipse or Eclipse RCP Framework and
embeded python language (formaly jython) - very important fact is that
jython scripts may controlled Eclipse widgets (for example
ProgressBar).

Regards,
Blazej

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fastest way to restore a database
Next
From: Greg Smith
Date:
Subject: Re: Fastest way to restore a database