Re: Another bug with parse statements on - Mailing list pgsql-odbc

From Andrea Aime
Subject Re: Another bug with parse statements on
Date
Msg-id 3AE3CA86.F8CCE044@comune.modena.it
Whole thread Raw
In response to Another bug with parse statements on  ("Andrea Aime" <aaime@comune.modena.it>)
Responses RE: Another bug with parse statements on  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
RE: Another bug with parse statements on  ("Hiroshi Inoue" <Inoue@seiren.co.jp>)
List pgsql-odbc
> >
> > 'SELECT min(classe) as minimo, max(classe) as massimo
> > FROM tav974'
> > (
> >  is a carriage return...)
> >
>
> What kind of errors do you see ?
> I couldn't find any related ERRORs in your log.
>

Snip from log file:

parse_statement: entering...
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='SELECT',
ptr='min(classe) as minimo, max(classe) as massimo
FROM tav974'
SELECT
got ispunct: s[3] = '('
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='min',
ptr='(classe) as minimo, max(classe) as massimo
FROM tav974'
reallocing at nfld=0
got field='min', dot=''
got ispunct: s[0] = '('
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='(',
ptr='classe) as minimo, max(classe) as massimo
FROM tav974'
**** got function = 'min'
got ispunct: s[6] = ')'
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='classe',
ptr=') as minimo, max(classe) as massimo
FROM tav974'
in_expr=0 or func=1
got ispunct: s[0] = ')'
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token=')', ptr='as
minimo, max(classe) as massimo
FROM tav974'
in_expr=0 or func=1
blevel-- = 0
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='as',
ptr='minimo, max(classe) as massimo
FROM tav974'
in_expr=0 or func=1
unquoted=1, quote=0, dquote=0, numeric=0, delim=',', token='minimo',
ptr=', max(classe) as massimo
FROM tav974'
in_expr=0 or func=1
got ispunct: s[5] = '('
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='max',
ptr='(classe) as massimo
FROM tav974'
in_expr=0 or func=1
got ispunct: s[0] = '('
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='(',
ptr='classe) as massimo
FROM tav974'
in_expr=0 or func=1
blevel++ = 1
got ispunct: s[6] = ')'
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='classe',
ptr=') as massimo
FROM tav974'
in_expr=0 or func=1
got ispunct: s[0] = ')'
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token=')', ptr='as
massimo
FROM tav974'
in_expr=0 or func=1
blevel-- = 0
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='as',
ptr='massimo
FROM tav974'
in_expr=0 or func=1
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='massimo',
ptr='FROM tav974'
in_expr=0 or func=1
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='FROM',
ptr='tav974'
FROM
unquoted=1, quote=0, dquote=0, numeric=0, delim=' ', token='tav974',
ptr=''
got table = 'tav974'
--------------------------------------------
nfld=1, ntab=1
Field 0:  expr=0, func=1, quote=0, dquote=0, numeric=0, name='min',
alias='', dot=''
Table 0: name='tav974', alias=''

nfld = 1? There are two fields in the result of my query. Moreover it
seems that he's
taking min as a the attribute name, not minimo... maybe it doesn't
recognize aggregate
function names?
Hope this helps
Andrea Aime

pgsql-odbc by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: Another bug with parse statements on
Next
From: Hiroshi Inoue
Date:
Subject: Re: Postgres 7.1, iODBC and PHP4