Search Postgresql Archives

A couple more PostgreSQL C questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a couple of more PostgreSQL C questions, about the following two
compiler warnings:

____________________________________________________
warning: ISO C90 forbids mixed declarations and code

This appears to be caused by the following statement:

   text* rand_dev = PG_GETARG_TEXT_P(0);

in the following context

PG_FUNCTION_INFO_V1( y_somefunc );
Datum
y_somefunc ( PG_FUNCTION_ARGS )
{
   if( PG_ARGISNULL(0) ||
       PG_ARGISNULL(1) ||
       PG_ARGISNULL(2) )
   {
      PG_RETURN_NULL();
   }
   text* rand_dev = PG_GETARG_TEXT_P(0);
   ...

Should I be concerned by this?  What's the proper way to code this?

_________________________________________________________________________________
warning: passing argument 3 of 'GetAttributeByNum' from incompatible pointer type

...caused by the following:

bool isNull;
...
n  = GetAttributeByNum( tup, 0, &isNull );

executor.h has:

/*
 * prototypes from functions in execQual.c
 */
extern Datum GetAttributeByNum(HeapTupleHeader tuple, AttrNumber attrno,
                  bool *isNull);

I'm just not seeing what's wrong here...

-- 
Ron Peterson
https://www.yellowbank.com/


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux