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

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

2014-04-24 Thread Tom Lane
Alvaro Herrera 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 way, anyway. > Because

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 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 w

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 t

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

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 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 non-co

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

2014-04-24 Thread Tom Lane
David Fetter 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 >> not real

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 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 > >> algo

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

2014-04-24 Thread Tom Lane
Hannu Krosing 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 core when the >>

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 writes: >> On 24 April 2014 05:32, David Fetter 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,

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 wrote: > > 2014-04-24 15:40 GMT+02:00 Marti Raudsepp : > > On Wed, Apr 23, 2014 at 11:26 AM, David Rowley >> 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 tab

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

2014-04-24 Thread Tom Lane
Simon Riggs writes: > On 24 April 2014 05:32, David Fetter 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, BIGSERIAL is. > +1 to include in

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 : > On Wed, Apr 23, 2014 at 11:26 AM, David Rowley > 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

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 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 useful to use as exa

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 wrote: > On 24 April 2014 05:32, David Fetter 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, B

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

2014-04-24 Thread Simon Riggs
On 24 April 2014 05:32, David Fetter wrote: > On Wed, Apr 23, 2014 at 08:27:52PM -0400, Tom Lane wrote: >> David Fetter 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

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 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 a module t

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

2014-04-23 Thread Tom Lane
David Fetter 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 make changes to

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

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 jso

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

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 Fabrízio de Royes Mello
On Wed, Apr 23, 2014 at 4:50 AM, Simon Riggs wrote: > > On 23 April 2014 07:14, Tom Lane wrote: > > Simon Riggs 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 sai

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 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); >

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 > (https://www.google-melange.com/gs

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

2014-04-23 Thread Thom Brown
On 23 April 2014 13:46, Heikki Linnakangas 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 the

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. Documentati

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 a

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 about

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

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

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 T

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 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

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.

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

2014-04-23 Thread Simon Riggs
On 23 April 2014 07:14, Tom Lane wrote: > Simon Riggs 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. I was taught that ideas are accep

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 creat

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 usa

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 : > On 04/23/2014 02:11 PM, Simon Riggs wrote: > > I propose we add a single table called Postgre

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

2014-04-22 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-22 Thread Tom Lane
Simon Riggs 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: http://www.postgresql.org/m

[HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-22 Thread Simon Riggs
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 -