Re:

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: rx <rong(dot)xie(at)stud(dot)tu-muenchen(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re:
Date: 2003-04-02 03:51:44
Message-ID: 3E8A5E50.1081C83C@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Rong,

for everything more sophisticated then blindfolded top down execution of
statements, I strongly recommend using a better scripting language than
sh or bash (like Tcl or perl).

Jan

> rx wrote:
>
> hallo,
>
> my Name is Rong. I am student at TU-Munich. I have some questions for
> Postgresql under SuSe Linux.
>
> I want save something in Postgresql-Table, when I get a fax from
> "Hylafax".
>
> I insert "
>
> psql -U postgres dbname <<END_OF_INSTR
>
> insert into "CSID_TIF"("CSID","suspens_file","actDatum")
> values('0049891234567','test.tif','01.01.2003'))
>
> END_OF_INSTR "
>
> in shell script.
>
> It work very good.
>
> Now I want enhance it.
>
> When there are some error in Postgresql, or There are some
> Error at insert, I want give a message per email to me.
>
> But I do not know, how can I get the Error from Postgresql in Linux
> Shell Script.
>
> When an Postgresql-Error is to happen, how can I get the
> Error-Message-Event in shell script and send a email to me.
>
> I hope I can get your Help!
>
> Thank you very much!
>
> best regards!
>
> rong
>
> PS: faxrcvd is my shell-script in Hylafax.
>
> #! /bin/sh
>
> psql -U postgres dbname <<END_OF_INSTR
>
> insert into "CSID_TIF"("CSID","suspens_file","actDatum")
> values('0049891234567','test.tif','01.01.2003'))
>
> END_OF_INSTR
>
> ##end script
>
> Name: faxrcvd
> faxrcvd Type: unspecified type (application/octet-stream)
> Encoding: quoted-printable
>
> ---------------------------------------------------------------
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo(at)postgresql(dot)org

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

  • at 2003-03-27 15:02:09 from rx

Browse pgsql-general by date

  From Date Subject
Next Message sebi 2003-04-02 04:18:57 segmentation fault in Mysql while deleting
Previous Message Jan Wieck 2003-04-02 03:44:01 Re: Trigger functions