From: | Igor Korot <ikorot01(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Sample in documentation |
Date: | 2017-05-07 00:06:50 |
Message-ID: | CA+FnnTz9rNCxbjM5HN+pmdG99POEODLAp92y04mJHWGiJqmd-A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi, ALL,
I tried to implement the code found in
https://www.postgresql.org/docs/current/static/libpq-example.html.
On Windows with MSVC 2010 and Liniux with gcc-5.4 it compiled fine.
However on OSX 10.8 with:
[code]
Igors-MacBook-Air:dbhandler igorkorot$ gcc --version
Configured with:
--prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
[/code]
I am getting an error:
[quote]
Non-constant-expression cannot be narrowed from type 'size_t' (aka
'unsigned long') to 'int' in initializer list
[/quote]
on the line that tries to create a length[2] array.
Now I should probably change it to "size_t length{2}" instead of "int
length[2]", but
I feel that this should be changed in the documentation.
That is unless I'm missing something and this official sample is correct.
Thank you.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-05-07 00:22:23 | Re: Sample in documentation |
Previous Message | Peter Devoy | 2017-05-06 20:35:59 | Any experiences with using PhpUnit's DbUnit extension with Postgres? |