{"repo":"petere/pguri","free":true,"listed":false,"github":"https://github.com/petere/pguri","clone":"git clone https://github.com/petere/pguri.git","description":"uri type for PostgreSQL","language":"C","stars":324,"topics":["postgresql","postgresql-extension","uri","url"],"license":null,"category":"databases-storage","readme_excerpt":"uri type for PostgreSQL ========================= https://twitter.com/pvh/status/567395527357001728 This is an extension for PostgreSQL that provides a uri data type. Advantages over using plain text for storing URIs include: - URI syntax checking - functions for extracting URI components - human-friendly sorting The actual URI parsing is provided by the uriparser library, which supports URI syntax as per RFC 3986. Note that this might not be the right data type to use if you want to store user-provided URI data, such as HTTP referrers, since they might contain arbitrary junk. Installation ------------ You need to have the above-mentioned uriparser library installed. It is included in many operating system distributions and package management systems. pkg-config will be used to find it. I recommend at least version 0.8.0. Older versions will also work, but they apparently contain some bugs and might fail to correctly accept or reject URI syntax corner cases. This is mainly a problem if your application needs to be robust against junk input. To build and install this module: make make install or selecting a specific PostgreSQL installation: make PG CONFIG=/some/where/bin/pg config make PG CONFIG=/some/where/bin/pg config install And finally inside the database: CREATE EXTENSION uri; Using ----- This module provides a data type uri that you can use like a normal type. For example: A number of functions are provided to extract parts of a URI: - uri scheme(uri) returns text Extra","default_branch":null,"files":null,"tree":[],"storefront":"/r/petere","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/petere/pguri/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}