Re: WIP: multivariate statistics / proof of concept
От | David Rowley |
---|---|
Тема | Re: WIP: multivariate statistics / proof of concept |
Дата | |
Msg-id | CAApHDvrTaW9fmL=chUX7H9bqLS+-4vX3Ou9vA0J8hk0or-rBig@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: WIP: multivariate statistics / proof of concept ("Tomas Vondra" <tv@fuzzy.cz>) |
Ответы |
Re: WIP: multivariate statistics / proof of concept
|
Список | pgsql-hackers |
On Thu, Oct 30, 2014 at 12:21 AM, Tomas Vondra <tv@fuzzy.cz> wrote:
Dne 29 Říjen 2014, 10:41, David Rowley napsal(a):I'll look into that. The thing is I don't have access to MSVC, so it's a bit> I'm quite interested in reviewing your work on this, but it appears that
> some of your changes are not C89:
>
> src\backend\commands\analyze.c(3774): error C2057: expected constant
> expression [D:\Postgres\a\postgres.vcxproj]
> src\backend\commands\analyze.c(3774): error C2466: cannot allocate an
> array of constant size 0 [D:\Postgres\a\postgres.vcxproj]
> src\backend\commands\analyze.c(3774): error C2133: 'indexes' : unknown
> size [D:\Postgres\a\postgres.vcxproj]
> src\backend\commands\analyze.c(4302): error C2057: expected constant
> expression [D:\Postgres\a\postgres.vcxproj]
> src\backend\commands\analyze.c(4302): error C2466: cannot allocate an
> array of constant size 0 [D:\Postgres\a\postgres.vcxproj]
> src\backend\commands\analyze.c(4302): error C2133: 'ndistincts' : unknown
> size [D:\Postgres\a\postgres.vcxproj]
> src\backend\commands\analyze.c(4775): error C2057: expected constant
> expression [D:\Postgres\a\postgres.vcxproj]
> src\backend\commands\analyze.c(4775): error C2466: cannot allocate an
> array of constant size 0 [D:\Postgres\a\postgres.vcxproj]
> src\backend\commands\analyze.c(4775): error C2133: 'keys' : unknown size
> [D:\Postgres\a\postgres.vcxproj]
>
difficult to spot / fix those issues :-(
It should be a pretty simple fix, just use the files and line numbers from the above. It's just a problem that in those 3 places you're declaring an array of a variable size, which is not allowed in C89. The thing to do instead would just be to palloc() the size you need and the pfree() it when you're done.
Regards
David Rowley
В списке pgsql-hackers по дате отправления: