From 949af991fc8c1f03af4eb1f940b96b4b5499e937 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Fri, 16 Nov 2001 05:55:10 +0000 Subject: [PATCH] Change SQLDescribeCol so that it returns alias name properly. --- src/interfaces/odbc/results.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interfaces/odbc/results.c b/src/interfaces/odbc/results.c index a5cee564f7..3bc5a5c0e1 100644 --- a/src/interfaces/odbc/results.c +++ b/src/interfaces/odbc/results.c @@ -240,7 +240,10 @@ PGAPI_DescribeCol( mylog("DescribeCol: getting info for icol=%d\n", icol); fieldtype = stmt->fi[icol]->type; - col_name = stmt->fi[icol]->name; + if (stmt->fi[icol]->alias[0]) + col_name = stmt->fi[icol]->alias; + else + col_name = stmt->fi[icol]->name; precision = stmt->fi[icol]->precision; scale = stmt->fi[icol]->scale; -- 2.11.0