diff options
author | Hiroshi Inoue <inoue@tpf.co.jp> | 2001-11-16 05:55:10 +0000 |
---|---|---|
committer | Hiroshi Inoue <inoue@tpf.co.jp> | 2001-11-16 05:55:10 +0000 |
commit | 949af991fc8c1f03af4eb1f940b96b4b5499e937 (patch) | |
tree | d31c295abc26d7b6dc61c389075b578c9929b496 | |
parent | 2a4660f5aa325b1e3876f9a8759beb6228f7dbb6 (diff) | |
download | postgresql-949af991fc8c1f03af4eb1f940b96b4b5499e937.tar.gz postgresql-949af991fc8c1f03af4eb1f940b96b4b5499e937.zip |
Change SQLDescribeCol so that it returns alias name properly.
-rw-r--r-- | src/interfaces/odbc/results.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/interfaces/odbc/results.c b/src/interfaces/odbc/results.c index a5cee564f77..3bc5a5c0e1a 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; |