A couple more PostgreSQL C questions

Поиск
Список
Период
Сортировка
От Ron Peterson
Тема A couple more PostgreSQL C questions
Дата
Msg-id 20061108005052.GD9684@yellowbank.com
обсуждение исходный текст
Ответы Re: A couple more PostgreSQL C questions  (Ron Peterson <ron.peterson@yellowbank.com>)
Re: A couple more PostgreSQL C questions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
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/

В списке pgsql-general по дате отправления:

Предыдущее
От: Ron Mayer
Дата:
Сообщение: Re: Stable sort?
Следующее
От: Ron Peterson
Дата:
Сообщение: Re: A couple more PostgreSQL C questions