pgindent changes to selfuncs.c - Mailing list pgsql-patches

From Bruce Momjian
Subject pgindent changes to selfuncs.c
Date
Msg-id 200105220131.f4M1V2x22386@candle.pha.pa.us
Whole thread Raw
List pgsql-patches
Here is how selfuncs.c would changes with the new pgindent.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
*** /bjm/old.c  Mon May 21 21:29:32 2001
--- /bjm/new.c  Mon May 21 21:29:16 2001
***************
*** 761,767 ****

  #ifdef NOT_USED
    Oid         operator = PG_GETARG_OID(1);
-
  #endif
    List       *args = (List *) PG_GETARG_POINTER(2);
    int         varRelid = PG_GETARG_INT32(3);
--- 761,766 ----
***************
*** 954,960 ****

  #ifdef NOT_USED                   /* see neqjoinsel() before removing me! */
    Oid         operator = PG_GETARG_OID(1);
-
  #endif
    List       *args = (List *) PG_GETARG_POINTER(2);
    Var        *var1;
--- 953,958 ----
***************
*** 1199,1213 ****
            /*
             * Built-in numeric types
             */
!           case BOOLOID:
!           case INT2OID:
!           case INT4OID:
!           case INT8OID:
!           case FLOAT4OID:
!           case FLOAT8OID:
!           case NUMERICOID:
!           case OIDOID:
!           case REGPROCOID:
            *scaledvalue = convert_numeric_to_scalar(value, valuetypid);
            *scaledlobound = convert_numeric_to_scalar(lobound, boundstypid);
            *scaledhibound = convert_numeric_to_scalar(hibound, boundstypid);
--- 1197,1211 ----
            /*
             * Built-in numeric types
             */
!       case BOOLOID:
!       case INT2OID:
!       case INT4OID:
!       case INT8OID:
!       case FLOAT4OID:
!       case FLOAT8OID:
!       case NUMERICOID:
!       case OIDOID:
!       case REGPROCOID:
            *scaledvalue = convert_numeric_to_scalar(value, valuetypid);
            *scaledlobound = convert_numeric_to_scalar(lobound, boundstypid);
            *scaledhibound = convert_numeric_to_scalar(hibound, boundstypid);
***************
*** 1262,1268 ****
  {
    switch (typid)
    {
!           case BOOLOID:
            return (double) DatumGetBool(value);
        case INT2OID:
            return (double) DatumGetInt16(value);
--- 1260,1266 ----
  {
    switch (typid)
    {
!       case BOOLOID:
            return (double) DatumGetBool(value);
        case INT2OID:
            return (double) DatumGetInt16(value);
***************
*** 1443,1449 ****
    char       *xfrmstr;
    size_t      xfrmsize;
    size_t      xfrmlen;
-
  #endif

    switch (typid)
--- 1441,1446 ----
***************
*** 1484,1490 ****

  #ifdef USE_LOCALE
    /* Guess that transformed string is not much bigger than original */
!   xfrmsize = strlen(val) + 32;/* arbitrary pad value here... */
    xfrmstr = (char *) palloc(xfrmsize);
    xfrmlen = strxfrm(xfrmstr, val, xfrmsize);
    if (xfrmlen >= xfrmsize)
--- 1481,1487 ----

  #ifdef USE_LOCALE
    /* Guess that transformed string is not much bigger than original */
!   xfrmsize = strlen(val) + 32;        /* arbitrary pad value here... */
    xfrmstr = (char *) palloc(xfrmsize);
    xfrmlen = strxfrm(xfrmstr, val, xfrmsize);
    if (xfrmlen >= xfrmsize)
***************
*** 1509,1515 ****
  {
    switch (typid)
    {
!           case TIMESTAMPOID:
            return DatumGetTimestamp(value);
        case ABSTIMEOID:
            return DatumGetTimestamp(DirectFunctionCall1(abstime_timestamp,
--- 1506,1512 ----
  {
    switch (typid)
    {
!       case TIMESTAMPOID:
            return DatumGetTimestamp(value);
        case ABSTIMEOID:
            return DatumGetTimestamp(DirectFunctionCall1(abstime_timestamp,
***************
*** 2103,2109 ****
        if (patt[pos] == '(')
        {
            if (paren_depth == 0)
!               paren_pos = pos;/* remember start of parenthesized item */
            paren_depth++;
        }
        else if (patt[pos] == ')' && paren_depth > 0)
--- 2100,2106 ----
        if (patt[pos] == '(')
        {
            if (paren_depth == 0)
!               paren_pos = pos;        /* remember start of parenthesized item */
            paren_depth++;
        }
        else if (patt[pos] == ')' && paren_depth > 0)
***************
*** 2270,2276 ****
        result = false;
    return (bool) result;
  #else                         /* not USE_LOCALE */
!               return true;    /* We must be in C locale, which is OK */
  #endif     /* USE_LOCALE */
  }

--- 2267,2273 ----
        result = false;
    return (bool) result;
  #else                         /* not USE_LOCALE */
!   return true;                /* We must be in C locale, which is OK */
  #endif     /* USE_LOCALE */
  }

***************
*** 2404,2410 ****
  static Datum
  string_to_datum(const char *str, Oid datatype)
  {
-
    /*
     * We cheat a little by assuming that textin() will do for bpchar and
     * varchar constants too...
--- 2401,2406 ----

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: pgindent fixes
Next
From: "Christopher Kings-Lynne"
Date:
Subject: A patch that adds primary key and unique key support to psql's \d