Thread: how to create or run an sql script on pgsql ?

how to create or run an sql script on pgsql ?

From
Andres Ledesma
Date:
Hi ,

I'm wondering if there is a way to create an script from a postgresql db, or
to run any text script on a pg db ?

Any help ?


Thanks in advance,


Andrew.


Re: how to create or run an sql script on pgsql ?

From
simran
Date:
I usually just use the shell...

Aka, put your sql commands in say sql.txt

then:

% psql yourdb < sql.txt



On Thu, 2003-02-06 at 10:31, Andres Ledesma wrote:
> Hi ,
>
> I'm wondering if there is a way to create an script from a postgresql db, or
> to run any text script on a pg db ?
>
> Any help ?
>
>
> Thanks in advance,
>
>
> Andrew.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



Re: how to create or run an sql script on pgsql ?

From
Andres Ledesma
Date:
Hi Simran,

Thanks for your Answer (tfya... this exist ?)
Well, that's okay,...but what about generating a script from db ?

Andrew