Thread

  1. I need a jump start

    Scott Holmes <sholmes@pacificnet.net> — 2001-05-16T03:36:59Z

    I need to write a C program that will require libpq and ecpg.  I'm hoping 
    someone can point me to an example.  I'm not a C programmer, so I need a crash 
    course or jump start.  The original program has existed as an Informix 4GL 
    program for many years.  We have lately been converting our application to 
    PostgreSQL.  All the user interfaces have been written with a rather obscure 
    set of tools to be run on Windows clients.  This particular program needs to 
    be run with cron on the server.  Essentially, it will scan a relatively short 
    list of records, compare values with records or tuples from a relatively large 
    table then insert into and or update other tables.  Interestingly enough, the 
    first table's name is trigger.  As most of the actions required are time 
    delayed (days or weeks), triggers are not a viable option for this.
    
    Does anyone have a suggestion for an existing program or code I can study to 
    give myself a leg up on this?
    
    Thanks, Scott
    
    
    
  2. Re: I need a jump start

    Eric G. Miller <egm2@jps.net> — 2001-05-16T05:21:22Z

    On Tue, May 15, 2001 at 08:36:59PM -0700, Scott Holmes wrote:
    > I need to write a C program that will require libpq and ecpg.  I'm hoping 
    > someone can point me to an example.  I'm not a C programmer, so I need a crash 
    > course or jump start.  The original program has existed as an Informix 4GL 
    > program for many years.  We have lately been converting our application to 
    > PostgreSQL.  All the user interfaces have been written with a rather obscure 
    > set of tools to be run on Windows clients.  This particular program needs to 
    > be run with cron on the server.  Essentially, it will scan a relatively short 
    > list of records, compare values with records or tuples from a relatively large 
    > table then insert into and or update other tables.  Interestingly enough, the 
    > first table's name is trigger.  As most of the actions required are time 
    > delayed (days or weeks), triggers are not a viable option for this.
    > 
    > Does anyone have a suggestion for an existing program or code I can study to 
    > give myself a leg up on this?
    
    Maybe a plpgsql function and a shell script would be easier for you?
    Sounds like most of the work can be done by PostgreSQL itself with
    standard SQL and a few flow control mechanisms (like in plpgsql).
    Anyway, there are some examples in the programming manual for all of the
    above...
    
    -- 
    Eric G. Miller <egm2@jps.net>