You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by "AlexanderSaydakov (via GitHub)" <gi...@apache.org> on 2023/05/19 00:25:52 UTC
[GitHub] [datasketches-postgresql] AlexanderSaydakov commented on a diff in pull request #64: update README.md
AlexanderSaydakov commented on code in PR #64:
URL: https://github.com/apache/datasketches-postgresql/pull/64#discussion_r1198415778
##########
README.md:
##########
@@ -16,98 +16,137 @@
specific language governing permissions and limitations
under the License.
-->
-# PostgreSQL Adaptor for C++ DataSketches
+# PostgreSQL DataSketches Extension
-Please visit the main [DataSketches website](https://datasketches.apache.org) for more information.
+Please visit our [DataSketches website](https://datasketches.apache.org) for more information.
-If you are interested in making contributions to this site please see our [Community](https://datasketches.apache.org/docs/Community/) page for how to contact us.
+If you are interested in making contributions to this site please see our
+[Community](https://datasketches.apache.org/docs/Community/) page for how to contact us.
---
-This module currently supports the following sketches:
+## This extension currently supports the following sketches:
- CPC (Compressed Probabilistic Counting) sketch - very compact (smaller than HLL when serialized) distinct-counting sketch
-- Theta sketch - distinct counting with set operations (intersection, a-not-b)
+- Theta sketch - distinct counting with set operations (union, intersection, a-not-b)
- HLL sketch - very compact distinct-counting sketch based on HyperLogLog algorithm
- KLL float quantiles sketch - for estimating distributions: quantile, rank, PMF (histogram), CDF
- Frequent strings sketch - capture the heaviest items (strings) by count or by some other weight
-## How to build and install
+## Building this PostgreSQL Extension Requires 4 Dependencies
-This code is intended to be distributed as a PostgreSQL extension on [PGXN site](https://pgxn.org/)
+* C++11
+* Boost version 1.76.0 we know this works, older and newer may work as well
+* PostgreSQL database versions 9.6 and higher
+* [DataSketches *C++/Python Core*](https://github.com/apache/datasketches-cpp) version 4.1.0 or later
-This code is expected to be compatible with PostgreSQL versions 9.6 and higher.
-PostreSQL must be installed to compile the extension. The path to PostgreSQL executables must be set up (try running 'pg_config' to test).
-For PostgreSQL installation instructions see [PostgreSQL documentation](https://www.postgresql.org/docs/current/tutorial-start.html)
+## Preparing the Components
-This code requires C++11.
+### Installing PostgreSQL Database
-This code depends on [datasketches-cpp](https://github.com/apache/datasketches-cpp/)
-and [Boost](https://www.boost.org/)
+* If you think your system already has the PostgreSQL database installed, try running '*pg_config*' to check the version.
+This will also indicate if the path to the PostgreSQL executables have been set up. If it is already installed, you can
+move to the next step.
+* If it is not installed, here are the installation instructions:
+[PostgreSQL documentation](https://www.postgresql.org/docs/current/tutorial-start.html)
-There are two slightly different ways to build this extension: from a PGXN distribution or from two separate packages: datasketches-postgresql and datasketches-cpp (either from GitHub or from [Apache archive](http://archive.apache.org/dist/datasketches/))
+### Preparing the PostgreSQL DataSketches Extension
+There are two different ways to obtain this extension.
-### PGXN extension
+* A single download from the **PGXN distribution**, which already contains the DataSketches **C++ Core** component,
+* Or download two separate packages, DataSketches **C++/Python Core** and DataSketches **C++ PostgreSQL Extension**,
+both of which can be obtained from
+[DataSketches download](https://datasketches.apache.org/docs/Community/Downloads.html).
- - Download the datasketches extension from [PGXN](https://pgxn.org/dist/datasketches/)
- - Unzip the package (the core library datasketches-cpp is included)
+#### Downloading From the PGXN distribution
+
+* Download the PostgreSQL **datasketches extension** from [PGXN](https://pgxn.org/dist/datasketches/)
+* Unzip the package (the DataSketches C++ Core is included)
+* Proceed to [Preparing Boost](#toc_10)
-### GitHub or Apache archive
+#### Downloading separate packages
- - Clone or download from GitHub or download from Apache archive both the datasketches-postgresql code and the core library datasketches-cpp (version mentioned above)
- - Place the core library as a subdirectory (or a link to it) inside of the datasketches-postgresql like so:
- - datasketches-cpp
- - datasketches-postgresql
- - datasketches-cpp -> ../datasketches-cpp
+##### Downloading DataSketches *C++ PostgreSQL Extension*
-### Boost
+* Download the DataSketches **C++ PostgreSQL Extension** into its own directory from
+[DataSketches download](https://datasketches.apache.org/docs/Community/Downloads.html)
+* Or from [GitHub](https://github.com/apache/datasketches-postgresql) selecting the correct version release tag.
+* Unzip the package
- - [Download Boost](https://www.boost.org/users/download/)
- - Unzip and rename or make a link with no version in the name like so:
- - boost -> boost_1_76_0
+##### Downloading DataSketches C++/Python Core
-### Building and installing
+* Download the DataSketches **C++/Python Core** into its own directory from
+[DataSketches download](https://datasketches.apache.org/docs/Community/Downloads.html) selecting the correct version.
+(You may need to check the archives: "Recent ZIP Releases".)
+* Or from [GitHub](https://github.com/apache/datasketches-cpp) selecting the correct version release tag.
+* Unzip and create a link in the same directory where the *DataSketches C++ PostgreSQL Extension* is:
+ * *datasketches-cpp* -> apache-datasketches-cpp-\<version\>
- - make
- - sudo make install
+### Preparing Boost
-On MacOSX Mojave, if you see a warning like this:
-`clang: warning: no such sysroot directory: ‘/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk’ [-Wmissing-sysroot]`
-and the compilation fails because of not being able to find system include files, this is a known OSX problem. There are known solutions on the Internet.
+* [Download Boost](https://www.boost.org/users/download/)
+* Unzip and create a link in the same directory where the *DataSketches C++ PostgreSQL Extension* is:
+ * *boost* -> boost_\<version\>
+
+### Building
+
+From the command line at the PGXN installed root or the root of the C++ PostgreSQL Adaptor run:
+
+* *make*
+* *sudo make install* #sudo may not be required depending on how C++ was installed
Review Comment:
sudo may not be required depending on how PSQL was installed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org