Обсуждение: pgsql: Prevent certain symbols that are used for both typedefs and
pgsql: Prevent certain symbols that are used for both typedefs and
От
 
		    	momjian@svr1.postgresql.org (Bruce Momjian)
		    Дата:
		        Log Message:
-----------
Prevent certain symbols that are used for both typedefs and variable
names from being added to pgindent's typedef list.  The existance of
them caused weird formatting in the date/type files, and in keywords.c.
Backpatch to 8.1.X.
Modified Files:
--------------
    pgsql/src/tools:
        find_typedef (r1.4 -> r1.5)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/tools/find_typedef.diff?r1=1.4&r2=1.5)
    pgsql/src/tools/pgindent:
        pgindent (r1.84 -> r1.85)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/tools/pgindent/pgindent.diff?r1=1.84&r2=1.85)
			
		momjian@svr1.postgresql.org (Bruce Momjian) writes:
> Prevent certain symbols that are used for both typedefs and variable
> names from being added to pgindent's typedef list.  The existance of
> them caused weird formatting in the date/type files, and in keywords.c.
Maybe it would be better to do some judicious renaming in the sources
to avoid the conflicts?  ISTM that failing to mark a typedef as such
will inevitably result in bad formatting of code that uses the name
as a typedef.
            regards, tom lane
			
		Tom Lane wrote: > momjian@svr1.postgresql.org (Bruce Momjian) writes: > > Prevent certain symbols that are used for both typedefs and variable > > names from being added to pgindent's typedef list. The existance of > > them caused weird formatting in the date/type files, and in keywords.c. > > Maybe it would be better to do some judicious renaming in the sources > to avoid the conflicts? ISTM that failing to mark a typedef as such > will inevitably result in bad formatting of code that uses the name > as a typedef. Yea, but I don't want to do anything like that now, especially since most of the date/time typedefs are used by ecpg and I am unsure what affect changing those might have. My logic was that is was better to have ecpg unclearly typedef'ed in a few places than to have an adt/ file show "interval ->days". "ANY" is coming from plperl but I can't see from where. -- 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