From 7c50abb3396529d2cf9e827cbd25efbfdd8df29b 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. --- results.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/results.c b/results.c index a5cee56..3bc5a5c 100644 --- a/results.c +++ b/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.39.5