Re: 9.4 Proposal: Initdb creates a single table

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: 9.4 Proposal: Initdb creates a single table
Дата
Msg-id CAApHDvr3dzB9Qpr-=EebichM5ma6NWMhXYEnA2Fs6kd0qzUbMA@mail.gmail.com
обсуждение исходный текст
Ответ на 9.4 Proposal: Initdb creates a single table  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: 9.4 Proposal: Initdb creates a single table  (Simon Riggs <simon@2ndQuadrant.com>)
Re: 9.4 Proposal: Initdb creates a single table  (Marti Raudsepp <marti@juffo.org>)
Список pgsql-hackers
On Wed, Apr 23, 2014 at 6:11 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
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.


I'm not quite sure it would serve the same purpose as to what you're proposing here, but for a long time I've thought that it would be nice if PostgreSQL came with an example database that had a number of tables, perhaps that mock up some easy to relate to real-world application. These would be very useful to use as examples in the documents instead of inventing them in the ad-hoc way that we currently do. Like here: http://www.postgresql.org/docs/9.3/static/tutorial-window.html

In the above link we have some table called empsalary, but the new user can't go an execute that query to test it without first working out how to first create a table and insert some data into that table.

It would be really nice if new users could create this example database somehow and then they could play around with the example queries we put in the manual.

Regards

David Rowley

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Petr Jelinek
Дата:
Сообщение: Re: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: CREATE FOREIGN TABLE ( ... LIKE ... )