Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Simon Riggs
On 24 April 2014 05:32, David Fetter da...@fetter.org wrote: On Wed, Apr 23, 2014 at 08:27:52PM -0400, Tom Lane wrote: David Fetter da...@fetter.org writes: Is there any good reason not to roll native UUID generation into our standard distribution? It's already there (as of 9.4) in

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Michael Paquier
On Thu, Apr 24, 2014 at 3:59 PM, Simon Riggs si...@2ndquadrant.com wrote: On 24 April 2014 05:32, David Fetter da...@fetter.org wrote: Since contrib/pgcrypto is a module that might well not be installed, people can't just build software for PostgreSQL and have UUIDs available, certainly not in

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Marti Raudsepp
On Wed, Apr 23, 2014 at 11:26 AM, David Rowley dgrowle...@gmail.com wrote: 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

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Pavel Stehule
2014-04-24 15:40 GMT+02:00 Marti Raudsepp ma...@juffo.org: On Wed, Apr 23, 2014 at 11:26 AM, David Rowley dgrowle...@gmail.com wrote: 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

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On 24 April 2014 05:32, David Fetter da...@fetter.org wrote: Since contrib/pgcrypto is a module that might well not be installed, people can't just build software for PostgreSQL and have UUIDs available, certainly not in the sense that, for example,

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Fabrízio de Royes Mello
On Thu, Apr 24, 2014 at 11:21 AM, Pavel Stehule pavel.steh...@gmail.comwrote: 2014-04-24 15:40 GMT+02:00 Marti Raudsepp ma...@juffo.org: On Wed, Apr 23, 2014 at 11:26 AM, David Rowley dgrowle...@gmail.com wrote: but for a long time I've thought that it would be nice if PostgreSQL came

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Hannu Krosing
On 04/24/2014 04:57 PM, Tom Lane wrote: Simon Riggs si...@2ndquadrant.com writes: On 24 April 2014 05:32, David Fetter da...@fetter.org wrote: Since contrib/pgcrypto is a module that might well not be installed, people can't just build software for PostgreSQL and have UUIDs available,

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Tom Lane
Hannu Krosing ha...@2ndquadrant.com writes: On 04/24/2014 04:57 PM, Tom Lane wrote: The reason why there's no generation function in core is that there is no standardized, guaranteed-to-produce-a-universally-unique-value generation algorithm. That was the reason for not putting something in

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread David Fetter
On Thu, Apr 24, 2014 at 11:30:15AM -0400, Tom Lane wrote: Hannu Krosing ha...@2ndquadrant.com writes: On 04/24/2014 04:57 PM, Tom Lane wrote: The reason why there's no generation function in core is that there is no standardized, guaranteed-to-produce-a-universally-unique-value generation

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Tom Lane
David Fetter da...@fetter.org writes: On Thu, Apr 24, 2014 at 11:30:15AM -0400, Tom Lane wrote: Essentially, that would mean carrying around our own implementation of libuuid --- which includes a bunch of not-terribly-portable stuff, such as discovering the machine's MAC address(es). That's

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Alvaro Herrera
Tom Lane wrote: This is not our fault, and I don't want us to get caught up in trying to fix a fundamentally broken concept --- which is what a generic uuidserial API would be. If you try to paper over the difficulties here, they'll just bite you on the rear someday. But we have

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Heikki Linnakangas
On 04/24/2014 08:00 PM, Alvaro Herrera wrote: Tom Lane wrote: This is not our fault, and I don't want us to get caught up in trying to fix a fundamentally broken concept --- which is what a generic uuidserial API would be. If you try to paper over the difficulties here, they'll just bite you

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Josh Berkus
On 04/24/2014 10:00 AM, Alvaro Herrera wrote: Tom Lane wrote: This is not our fault, and I don't want us to get caught up in trying to fix a fundamentally broken concept --- which is what a generic uuidserial API would be. If you try to paper over the difficulties here, they'll just bite

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Alvaro Herrera
Heikki Linnakangas wrote: On 04/24/2014 08:00 PM, Alvaro Herrera wrote: Tom Lane wrote: This is not our fault, and I don't want us to get caught up in trying to fix a fundamentally broken concept --- which is what a generic uuidserial API would be. If you try to paper over the difficulties

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Alvaro Herrera
Alvaro Herrera wrote: Heikki Linnakangas wrote: On 04/24/2014 08:00 PM, Alvaro Herrera wrote: Tom Lane wrote: This is not our fault, and I don't want us to get caught up in trying to fix a fundamentally broken concept --- which is what a generic uuidserial API would be. If you try

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Heikki Linnakangas
On 04/24/2014 08:23 PM, Alvaro Herrera wrote: Alvaro Herrera wrote: Heikki Linnakangas wrote: On 04/24/2014 08:00 PM, Alvaro Herrera wrote: Tom Lane wrote: This is not our fault, and I don't want us to get caught up in trying to fix a fundamentally broken concept --- which is what a generic

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Oh, I think I see your point: it's that no matter what we do here, there would be no way to guarantee that a value we generate does not collide with any other value elsewhere (either on other uuidserial columns, or on other servers). Not that

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Peter Eisentraut
On Thu, 2014-04-24 at 13:45 -0400, Tom Lane wrote: Having said that, though, the argument around whether such facilities belong in core seems to devolve to whether you want to buy into maintaining libuuid for ourselves (in fact worse than that: it's not clear that libuuid ever has worked on

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: By now, some of you will be doubled over laughing as if this is an April fool joke. Indeed. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Craig Ringer
On 04/23/2014 02:11 PM, Simon Riggs wrote: I propose we add a single table called Postgres when we Initdb CREATE TABLE Postgres (Id Integer, Data Jsonb); Without particular comment on the need for the table, I'd be concerned about calling it postgres. My personal impression from Stack

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Pavel Stehule
Hello if you are thinking about this direction, then store there some demo project. I am don't think so isolated table has significant price. Regards Pavel 2014-04-23 8:45 GMT+02:00 Craig Ringer cr...@2ndquadrant.com: On 04/23/2014 02:11 PM, Simon Riggs wrote: I propose we add a single

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Albe Laurenz
Simon Riggs 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.

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Craig Ringer
On 04/23/2014 03:20 PM, Albe Laurenz wrote: Good that you mention that! I have wondered what to do with it. When I first connected to PostgreSQL, I created a sample table, but the senior developer from the other office told me that this is the postgres database and that I shouldn't create any

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Simon Riggs
On 23 April 2014 07:14, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: By now, some of you will be doubled over laughing as if this is an April fool joke. Indeed. I do like to share the odd joke now and then, it has to be said. So I'm glad I enriched your day.

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Albe Laurenz
Craig Ringer wrote: Good that you mention that! I have wondered what to do with it. When I first connected to PostgreSQL, I created a sample table, but the senior developer from the other office told me that this is the postgres database and that I shouldn't create any objects there. What

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread David Rowley
On Wed, Apr 23, 2014 at 6:11 PM, Simon Riggs si...@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

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Hannu Krosing
On 04/23/2014 08:11 AM, Simon Riggs 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

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Simon Riggs
On 23 April 2014 09:26, David Rowley dgrowle...@gmail.com wrote: On Wed, Apr 23, 2014 at 6:11 PM, Simon Riggs si...@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

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Mark Kirkwood
This seems like a much better idea - whereas a single table, related to nothing - on the other hand, is at best not very helpful (and it could be argued, might contribute to teaching poor data data design). Regards Mark On 23/04/14 19:13, Pavel Stehule wrote: Hello if you are thinking

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Stephen Frost
* Simon Riggs (si...@2ndquadrant.com) wrote: +1 to the idea of an example database, used throughout the docs Sounds like a summer of code project. Agreed. I'll add it to the GSoC ideas page. Since we don't have that now, it won't work for 9.4. None of this is on the table for 9.4 as far as

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Heikki Linnakangas
On 04/23/2014 03:28 PM, Stephen Frost wrote: * Simon Riggs (si...@2ndquadrant.com) wrote: +1 to the idea of an example database, used throughout the docs Sounds like a summer of code project. Agreed. I'll add it to the GSoC ideas page. I don't think this is a good GSoC project.

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Thom Brown
On 23 April 2014 13:46, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 04/23/2014 03:28 PM, Stephen Frost wrote: * Simon Riggs (si...@2ndquadrant.com) wrote: +1 to the idea of an example database, used throughout the docs Sounds like a summer of code project. Agreed. I'll add it to

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Stephen Frost
Heikki, * Heikki Linnakangas (hlinnakan...@vmware.com) wrote: On 04/23/2014 03:28 PM, Stephen Frost wrote: Agreed. I'll add it to the GSoC ideas page. I don't think this is a good GSoC project. Documentation-only projects are not eligible for GSoC

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Alexander Korotkov
On Wed, Apr 23, 2014 at 10:11 AM, Simon Riggs si...@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,

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Fabrízio de Royes Mello
On Wed, Apr 23, 2014 at 4:50 AM, Simon Riggs si...@2ndquadrant.com wrote: On 23 April 2014 07:14, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: By now, some of you will be doubled over laughing as if this is an April fool joke. Indeed. I do like to

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Josh Berkus
On 04/23/2014 07:43 AM, Alexander Korotkov wrote: 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

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Alvaro Herrera
Josh Berkus wrote: On 04/23/2014 07:43 AM, Alexander Korotkov wrote: 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

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread David Fetter
On Wed, Apr 23, 2014 at 02:26:50PM -0300, Alvaro Herrera wrote: Josh Berkus wrote: On 04/23/2014 07:43 AM, Alexander Korotkov wrote: I can propose contrib PostgreNoSQL providing following: 1) Table postgres as you proposed. 2) Functions: get_postgres(id intgeger) returns jsonb,

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread David Fetter
On Wed, Apr 23, 2014 at 12:24:21PM -0700, David Fetter wrote: On Wed, Apr 23, 2014 at 02:26:50PM -0300, Alvaro Herrera wrote: Josh Berkus wrote: On 04/23/2014 07:43 AM, Alexander Korotkov wrote: I can propose contrib PostgreNoSQL providing following: 1) Table postgres as you

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread Tom Lane
David Fetter da...@fetter.org writes: Is there any good reason not to roll native UUID generation into our standard distribution? It's already there (as of 9.4) in pg_crypto. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-23 Thread David Fetter
On Wed, Apr 23, 2014 at 08:27:52PM -0400, Tom Lane wrote: David Fetter da...@fetter.org writes: Is there any good reason not to roll native UUID generation into our standard distribution? It's already there (as of 9.4) in pg_crypto. Sorry I wasn't clear enough. Since contrib/pgcrypto is