Re: 9.4 Proposal: Initdb creates a single table

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 9.4 Proposal: Initdb creates a single table
Date: 2014-04-23 14:43:01
Message-ID: CAPpHfdsTkAzHXT6M6PUfey9pu5Rp+rJBmhLmHHRBbPE6bVwJ+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 23, 2014 at 10:11 AM, Simon Riggs <simon(at)2ndquadrant(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2014-04-23 15:20:45 Review: ECPG FETCH readahead
Previous Message Tom Lane 2014-04-23 14:17:48 Re: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)