Postgres-XL: functions for JSON - database

As it stated, Postgres-XL is based on PostgreSQL 9.2 and it should have json data type.
Is there any way to use functions for json datatype as in Postgresql 9.3?

Not easily.
You could probably backport the patch series that added json functions to PostgreSQL 9.3, but some understanding of PostgreSQL's source code and structure would be required, as well as some C programming knowledge.
An alternative would be to hire someone to assist with backporting; see the support page.

With the current Postgres-XL (9.5) you have full JSON and JSONB function support.

Related

Convert geometries to feature collections on Greenplum with PostGIs extension

I am new to Greenplum. I used to work on PostgreSQL with PostGIS extension.
Right now I foudnd out that there is no row_to_json function in Greenplum. Is there any function that is similar to this one? I have to use this function to convert geometries to Feature Collection.
JSON is not a supported datatype in Greenplum.
Here is the current guide on using postGIS in Greenplum: http://gpdb.docs.pivotal.io/4340/ref_guide/postGIS.html

fetch document version in nuxeo

Is there a way to get all versions and related File of single document
Suppose that I have published document 'abcd' with version 1.0. Then later, I modify the document and publish it with 1.5 and i want both version in java so is ther any possible way to get all documents with diffrent version in nuxeo.
Yes, CoreSession.getVersions will do that for you. There are also variants of this API that returns just document references or a bit more information related to each version. You should peruse the CoreSession API to know more.

Postgis - How to get the GUI to work?

I started working with PostGIS in Action. The book shows a bunch of neat graphics created from various queries, but there is no mention of how to get these graphics to show up. The queries are working fine.
All of the tutorials I have found online appear outdated, suggesting, for example, to install plugins that are no longer available. I know I'm missing something obvious, but I have no idea what it would be.
I'm using Windows 7, PostgreSQL 9.3, PostGIS 2.1.
UPDATE
Thanks a lot guys. I settled on QGIS and it works as promised. So hard to pick either answer as they are both brilliant and informative.
There is no built-in GUI for Postgis queries. You have a number of options:
Connect to Postgis directly from QGIS or other GIS package that supports direct connections.
Use ogr2ogr utility to convert to another format such as shp or kml and use ArcGIS, Google Earth, etc to visualize the results.
Write the results out as WKT (well-known text) or GeoJSON and load them into a web mapping library such as OpenLayers. There is an example of a WKT reader here: OpenLayers WKT example. GeoJSON is a format that has gained a lot of traction, as it is very amenable to manipulation in Javascript and hence mapping libraries such as OpenLayers or Leaflet.
If you decide to use the ogr2ogr route, here is a cheat sheet provided by the authors of the Postgis book: http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet
I am sure there are other options, but these are the ones that sprung to mind.
PostGIS has no GUI, it's a database extension and so it's purely backend.
If you want graphicals you need a 3rd party gis application to do that. Some worth trying might be:
QGIS - probably the most popular FLOSS gis application
OpenJUMP - a much simpler although quite limited FLOSS
ArcGIS - most advanced and most expensive
Your book probably has a note explaining where the screenshots come from, try searching towards the back of the book.

Do you know a database written in Perl with DBI interface?

Do you know a database written purely in Perl with DBI interface?
Or what can be used if there is no MySql or Postgresql installed and I want to use Perl only?
Thank you.
Ok, I just wanted something that can be used with Catalyst.
What about SQLite? DBD::SQLite
I believe DBD::CSV is a simple DBD implementation that uses Text::CSV to persist data to CSV files.
That depends greatly on what you consider "database".
If you just want something to store your data, there's a number of Perl databases avialable. Some are listed here: http://www.perl.com/pub/a/2004/09/12/embedded.html
Tie::File
Berkley DB
SQLite
Please note that despite "SQLite is written in C" comments I saw here, the article explicitly states:
Conveniently, the DBI-driver for
SQLite, DBD::SQLite, already contains
the database engine itself as part of
the module - so installing this module
is all that is required to be able to
use SQLite from Perl.
However, NONE of the above is a real database engine, supporting transactions etc..., although some allow SQL-like query language access
I'm not aware of any real database engines implemented in Perl.
Perl rule 34:
If you can imagine it, there's a DBD
module for it ;)
http://search.cpan.org/search?m=module&q=DBD::&s=1
AFAIK there is no database in pure perl that is relational, it's not really economical; you might look in ACME on CPAN.
Essentially you have two choices: a pure perl module that provides a DBD package that wraps around, for example .txt, .csv, or .xml files.
If there is none, you could also implement a BDB/DBM style system of your own using pure perl, much like Ken Thompson did in C with DBM. It however, wouldn't be as complex as having SQL based relational database.
If you expect to use SQL, use an SQL based database.
DBD::DBM is a pure Perl database driver which is part of DBI itself since version 1.42 (April 2004). It can work with a variety of different database formats using the respective modules, e.g. BerkleyDB or SDBM_File (core module).
One needs to combine this with MLDBM to get a usable database (otherwise ony two columns per table are supported).
The documentation of DBD::DBM is quite extensive and provides a good overview of the different options and how to set it up.

is there a C library for validating XML against a XML schema?

See question. Also any links to example code or example code on how to validate an xml file against multiple schemas would be helpful.
EDT: Sorry forgot to mention that this is for LINUX
libxml2 is portable, pure C and implements XML Schema. It is also open-source (MIT license) and has an active developer community.
If you're targeting Windows platforms, you can use MSXML, but your use case has to allow COM.
EDIT: Apache has an open-source XML library called Xerces-C++ that supports schema validation. It's not C-compatible, but if you can get away with using C++, it should do what you need.

Resources