Re: InvalidOid & C++

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: InvalidOid & C++
Дата
Msg-id
200303180133.h2I1XgV09718@candle.pha.pa.us
Ответ на
InvalidOid & C++ (Jeroen T. Vermeulen)
Список
Дерево обсуждения
InvalidOid & C++ "Jeroen T. Vermeulen" <jtv@xs4all.nl>
Re: InvalidOid & C++ Bruce Momjian <pgman@candle.pha.pa.us>
Re: InvalidOid & C++ "Nigel J. Andrews" <nandrews@investsystems.co.uk>
Re: InvalidOid & C++ "Jeroen T. Vermeulen" <jtv@xs4all.nl>
Re: InvalidOid & C++ Bruce Momjian <pgman@candle.pha.pa.us>

How widespread is Oid(0) in C++?  I have never seen anything like that. 
It looks like a function call!

---------------------------------------------------------------------------

Jeroen T. Vermeulen wrote:
> Compiling anything that uses InvalidOid under g++ yields a warning about
> the expression using an "old-style cast."  Therefore, would it be okay to
> patch postgres_ext.h as follows:
> 
> 
> *** src/include/postgres_ext.h	2003-02-22 16:24:28.000000000 +0100
> --- ../postgres_ext.h	2003-03-06 21:44:11.000000000 +0100
> ***************
> *** 28,34 ****
> --- 28,38 ----
>    */
>   typedef unsigned int Oid;
>   
> + #ifdef __cplusplus
> + #define InvalidOid		(Oid(0))
> + #else
>   #define InvalidOid		((Oid) 0)
> + #endif
>   
>   #define OID_MAX  UINT_MAX
>   /* you will need to include  to use the above #define */
> 
> 
> Jeroen
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
В списке pgsql-patches по дате отправления
От: Bruce Momjian
Дата:
Сообщение: Re: psql patch for datestyle
От: Bruce Momjian
Дата:
FAQ