From: | Igor Korot <ikorot01(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Sample in documentation |
Date: | 2017-05-07 17:20:34 |
Message-ID: | CA+FnnTxodYdWi3fb+tgK=qZnfBdj6F+5ztVTwhwq-kr9mbYROQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom et al,
On Sun, May 7, 2017 at 1:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Igor Korot <ikorot01(at)gmail(dot)com> writes:
>> On Sat, May 6, 2017 at 8:22 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> I do not see any arrays named "length", nor even any arrays of size 2,
>>> on that page, so I'm pretty confused what you're talking about. Please
>>> be more specific.
>
>> I based my code on this:
>> http://stackoverflow.com/questions/26911855/correct-way-to-bind-numeric-values-to-prepared-sql.
>> Sorry about that.
>
> Ah. Well, we can't be responsible for random bits of code posted on
> stackoverflow.
>
>> Nevertheless, while it did compile by MSVC and gcc, it looks like
>> Xcode fails with compiling that code.
>
> Seems to me clang is being overly picky, but whatever.
>
>> So, is there any solution to this which can be used cross-platform?
>
> Don't use an initializer, assign the values one at a time.
Yes, that's what I ended up doing.
>
> Back in the day we used to avoid use of initializers for local variables
> because they weren't too portable. It's depressing to see clang
> introducing new reasons for them not to be portable.
OK.
It would be nice to see what Borland would do in this case. ;-)
BTW, what do you guys use to build binaries for OSX? clang? gcc?
Thank you.
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Igor Korot | 2017-05-07 17:40:13 | Re: |
Previous Message | Tom Lane | 2017-05-07 17:09:13 | Re: Sample in documentation |