Thread

  1. Error trying to compile a simple C trigger

    Marco Nenciarini <marco.nenciarini@2ndquadrant.it> — 2012-03-20T10:53:06Z

    I was trying to compile orafce on the current master and it yield
    an error at line
    
     tupdesc = trigdata->tg_relation->rd_att;
    
    alert.c: In function ‘dbms_alert_defered_signal’:
    alert.c:839:33: error: dereferencing pointer to incomplete type
    make: *** [alert.o] Error 1
    
    I've also tried the example at
    
    http://www.postgresql.org/docs/devel/static/trigger-example.html
    
    and the result is exactly the same.
    
    trigtest.c: In function ‘trigf’:
    trigtest.c:44:36: error: dereferencing pointer to incomplete type
    make: *** [trigtest.o] Error 1
    
    Regards,
    Marco
    
    -- 
    Marco Nenciarini - 2ndQuadrant Italy
    PostgreSQL Training, Services and Support
    marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it 
    
    
    
    
  2. Re: Error trying to compile a simple C trigger

    Peter Geoghegan <peter@2ndquadrant.com> — 2012-03-20T11:16:11Z

    On 20 March 2012 10:53, Marco Nenciarini
    <marco.nenciarini@2ndquadrant.it> wrote:
    > alert.c: In function ‘dbms_alert_defered_signal’:
    > alert.c:839:33: error: dereferencing pointer to incomplete type
    > make: *** [alert.o] Error 1
    >
    > I've also tried the example at
    >
    > http://www.postgresql.org/docs/devel/static/trigger-example.html
    >
    > and the result is exactly the same.
    >
    > trigtest.c: In function ‘trigf’:
    > trigtest.c:44:36: error: dereferencing pointer to incomplete type
    > make: *** [trigtest.o] Error 1
    
    I'd say this is an unintended consequence of a pgrminclude run. Try adding this:
    
    #include "access/tupdesc.h"
    
    -- 
    Peter Geoghegan       http://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Training and Services
    
    
  3. Re: Error trying to compile a simple C trigger

    Marco Nenciarini <marco.nenciarini@devise.it> — 2012-03-20T11:26:04Z

    Il giorno mar, 20/03/2012 alle 11.16 +0000, Peter Geoghegan ha scritto:
    > On 20 March 2012 10:53, Marco Nenciarini
    > <marco.nenciarini@2ndquadrant.it> wrote:
    > > alert.c: In function ‘dbms_alert_defered_signal’:
    > > alert.c:839:33: error: dereferencing pointer to incomplete type
    > > make: *** [alert.o] Error 1
    > >
    > > I've also tried the example at
    > >
    > > http://www.postgresql.org/docs/devel/static/trigger-example.html
    > >
    > > and the result is exactly the same.
    > >
    > > trigtest.c: In function ‘trigf’:
    > > trigtest.c:44:36: error: dereferencing pointer to incomplete type
    > > make: *** [trigtest.o] Error 1
    > 
    > I'd say this is an unintended consequence of a pgrminclude run. Try adding this:
    > 
    > #include "access/tupdesc.h"
    
    It doesn't work. The error is stil the same.
    
    Regards,
    Marco
    
    -- 
    Marco Nenciarini - System manager @ Devise.IT
    marco.nenciarini@devise.it | http://www.devise.it
    
    
    
    
  4. Re: Error trying to compile a simple C trigger

    Marco Nenciarini <marco.nenciarini@2ndquadrant.it> — 2012-03-20T11:44:39Z

    Il giorno mar, 20/03/2012 alle 11.16 +0000, Peter Geoghegan ha scritto:
    > On 20 March 2012 10:53, Marco Nenciarini
    > <marco.nenciarini@2ndquadrant.it> wrote:
    > > alert.c: In function ‘dbms_alert_defered_signal’:
    > > alert.c:839:33: error: dereferencing pointer to incomplete type
    > > make: *** [alert.o] Error 1
    > >
    > > I've also tried the example at
    > >
    > > http://www.postgresql.org/docs/devel/static/trigger-example.html
    > >
    > > and the result is exactly the same.
    > >
    > > trigtest.c: In function ‘trigf’:
    > > trigtest.c:44:36: error: dereferencing pointer to incomplete type
    > > make: *** [trigtest.o] Error 1
    > 
    > I'd say this is an unintended consequence of a pgrminclude run. Try adding this:
    > 
    > #include "access/tupdesc.h"
    
    It doesn't work. The error is stil the same.
    
    Regards,
    Marco
    
    -- 
    Marco Nenciarini - 2ndQuadrant Italy
    PostgreSQL Training, Services and Support
    marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it 
    
    
    
    
  5. Re: Error trying to compile a simple C trigger

    Asif Naeem <asif.naeem@enterprisedb.com> — 2012-03-20T11:46:58Z

    It seems that compiler is complain about "Relation" structure, can you
    please try adding the following in trigtest.c i.e.
    
    #include "utils/rel.h"
    
    Best Regards,
    Asif Naeem
    
    On Tue, Mar 20, 2012 at 3:53 PM, Marco Nenciarini <
    marco.nenciarini@2ndquadrant.it> wrote:
    
    > I was trying to compile orafce on the current master and it yield
    > an error at line
    >
    >  tupdesc = trigdata->tg_relation->rd_att;
    >
    > alert.c: In function ‘dbms_alert_defered_signal’:
    > alert.c:839:33: error: dereferencing pointer to incomplete type
    > make: *** [alert.o] Error 1
    >
    > I've also tried the example at
    >
    > http://www.postgresql.org/docs/devel/static/trigger-example.html
    >
    > and the result is exactly the same.
    >
    > trigtest.c: In function ‘trigf’:
    > trigtest.c:44:36: error: dereferencing pointer to incomplete type
    > make: *** [trigtest.o] Error 1
    >
    > Regards,
    > Marco
    >
    > --
    > Marco Nenciarini - 2ndQuadrant Italy
    > PostgreSQL Training, Services and Support
    > marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it
    >
    >
    >
    > --
    > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
    > To make changes to your subscription:
    > http://www.postgresql.org/mailpref/pgsql-hackers
    >
    
  6. Re: Error trying to compile a simple C trigger

    Marco Nenciarini <marco.nenciarini@2ndquadrant.it> — 2012-03-20T11:48:56Z

    Il giorno mar, 20/03/2012 alle 16.46 +0500, Asif Naeem ha scritto:
    > It seems that compiler is complain about "Relation" structure, can you
    > please try adding the following in trigtest.c i.e.
    > 
    > #include "utils/rel.h"
    > 
    
    It does the trick.
    
    Regards,
    Marco
    
    -- 
    Marco Nenciarini - 2ndQuadrant Italy
    PostgreSQL Training, Services and Support
    marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it 
    
    
    
    
  7. Re: Error trying to compile a simple C trigger

    Alvaro Herrera <alvherre@commandprompt.com> — 2012-03-20T14:44:21Z

    Excerpts from Marco Nenciarini's message of mar mar 20 07:53:06 -0300 2012:
    > I was trying to compile orafce on the current master and it yield
    > an error at line
    > 
    >  tupdesc = trigdata->tg_relation->rd_att;
    > 
    > alert.c: In function ‘dbms_alert_defered_signal’:
    > alert.c:839:33: error: dereferencing pointer to incomplete type
    > make: *** [alert.o] Error 1
    > 
    > I've also tried the example at
    > 
    > http://www.postgresql.org/docs/devel/static/trigger-example.html
    > 
    > and the result is exactly the same.
    > 
    > trigtest.c: In function ‘trigf’:
    > trigtest.c:44:36: error: dereferencing pointer to incomplete type
    > make: *** [trigtest.o] Error 1
    
    Thanks ... it seems we need these fixes (each of them backpatched to a
    different set of releases).
    
    -- 
    Álvaro Herrera <alvherre@commandprompt.com>
    The PostgreSQL Company - Command Prompt, Inc.
    PostgreSQL Replication, Consulting, Custom Development, 24x7 support
    
  8. Re: Error trying to compile a simple C trigger

    Alvaro Herrera <alvherre@commandprompt.com> — 2012-03-20T20:16:17Z

    Excerpts from Marco Nenciarini's message of mar mar 20 07:53:06 -0300 2012:
    > I was trying to compile orafce on the current master and it yield
    > an error at line
    > 
    >  tupdesc = trigdata->tg_relation->rd_att;
    > 
    > alert.c: In function ‘dbms_alert_defered_signal’:
    > alert.c:839:33: error: dereferencing pointer to incomplete type
    > make: *** [alert.o] Error 1
    > 
    > I've also tried the example at
    > 
    > http://www.postgresql.org/docs/devel/static/trigger-example.html
    > 
    > and the result is exactly the same.
    > 
    > trigtest.c: In function ‘trigf’:
    > trigtest.c:44:36: error: dereferencing pointer to incomplete type
    > make: *** [trigtest.o] Error 1
    
    Thanks, I believe the example is fixed now.
    
    -- 
    Álvaro Herrera <alvherre@commandprompt.com>
    The PostgreSQL Company - Command Prompt, Inc.
    PostgreSQL Replication, Consulting, Custom Development, 24x7 support