Remove colname generic option.
authorShigeru Hanada <[email protected]>
Fri, 17 Dec 2010 07:24:22 +0000 (16:24 +0900)
committerShigeru Hanada <[email protected]>
Fri, 17 Dec 2010 07:24:22 +0000 (16:24 +0900)
contrib/postgresql_fdw/postgresql_fdw.c
src/backend/foreign/foreign.c

index 1599c42a1b15d46166fb655351796311f355f016..022e513b51c146043e4a09f4311d953584426ccd 100644 (file)
@@ -210,35 +210,16 @@ deparseSelectClause(StringInfo sql, ForeignTable *table, TupleDesc tupdesc,
    first = true;
    for (i = 0; i < tupdesc->natts; i++)
    {
-#ifdef NOT_USED
-       List       *options;
-       ListCell   *lc;
-#endif
-       char       *colname = NULL;
+       char       *colname;
 
        /* skip dropped attributes */
        if (tupdesc->attrs[i]->attisdropped)
            continue;
 
-       /* Determine column name to be used */
-#ifdef NOT_USED
-       options = GetGenericOptionsPerColumn(table->relid, i + 1);
-       foreach (lc, options)
-       {
-           DefElem    *def = (DefElem *) lfirst(lc);
-           if (strcmp(def->defname, "colname") == 0)
-           {
-               colname = strVal(def->arg);
-               break;
-           }
-       }
-#endif
-       if (!colname)
-           colname = tupdesc->attrs[i]->attname.data;
-
        if (!first)
            appendStringInfoString(sql, ", ");
 
+       colname = tupdesc->attrs[i]->attname.data;
        if (prefix)
            appendStringInfo(sql, "%s.%s", aliasname_q, colname);
        else
index dc2f95ac17d7d3a44b0bf5681df3408f370a30c1..2e2f0774307cb1312a5ab11bf9e44fdd0d76bc74 100644 (file)
@@ -355,9 +355,6 @@ static struct PgFdwOption valid_options[] = {
    /* Catalog options */
    {"nspname", ForeignTableRelationId, false},
    {"relname", ForeignTableRelationId, false},
-#ifdef NOT_USED
-   {"colname", AttributeRelationId, false},
-#endif
 
    /* Planner cost options */
    {"connection_cost", ForeignServerRelationId, false},