Re: 9.4 Proposal: Initdb creates a single table - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: 9.4 Proposal: Initdb creates a single table
Date
Msg-id CAPpHfdsTkAzHXT6M6PUfey9pu5Rp+rJBmhLmHHRBbPE6bVwJ+g@mail.gmail.com
Whole thread Raw
In response to 9.4 Proposal: Initdb creates a single table  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Wed, Apr 23, 2014 at 10:11 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
We start with a database called Postgres and a schema called Public.
Yet we don't start up with any usable tables.

I propose we add a single table called Postgres when we Initdb

  CREATE TABLE Postgres (Id Integer, Data Jsonb);
  COMMENT ON TABLE Postgres IS 'Single table for quick start usage -
design your database';

The purpose of this is to make the database immediately usable. By
including this table in the default  initdb it will mean that programs
can rely on the existence of this table and begin working quicker.

By now, some of you will be doubled over laughing as if this is an
April fool joke.  I don't mean it to be at all.

I can propose contrib PostgreNoSQL providing following:
1) Table postgres as you proposed.
2) Functions: get_postgres(id intgeger) returns jsonb, set_postgres(id integer, data jsonb) returns void, search_postgres(query jsonb) returns setof postgres. search_postgres will have semantics of @> jsonb operator
3) Background workers which provides HTTP wrapper over those functions.

------
With best regards,
Alexander Korotkov. 

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Next
From: Antonin Houska
Date:
Subject: Review: ECPG FETCH readahead