Re: [HACKERS] Packages: Again

2017-02-22 Thread Bruce Momjian
On Fri, Feb 3, 2017 at 07:59:26AM +0100, Pavel Stehule wrote: > It should be documented and presented (who is read a documentation? :-)) > > It is not only PostgreSQL issue, same issue has to have any other databases. > The Oracle architecture is very specific and often question is, how to map >

Re: [HACKERS] Packages: Again

2017-02-03 Thread Pavel Stehule
2017-02-03 23:24 GMT+01:00 Serge Rielau : > > > > > Still I little bit afraid about nesting - Postgres allows function > overloading with specific mechanism of selecting called function. Sometimes > it is problematic now, and the this structure is flat. > > > > I like a idea of

Re: [HACKERS] Packages: Again

2017-02-03 Thread Serge Rielau
> > Still I little bit afraid about nesting - Postgres allows function > overloading with specific mechanism of selecting called function. Sometimes > it is problematic now, and the this structure is flat. > > I like a idea of more close relation between function and schema. This means >

Re: [HACKERS] Packages: Again

2017-02-03 Thread Pavel Stehule
2017-02-03 18:30 GMT+01:00 Serge Rielau : > > DB2 propose using schemas instead packages >> > >> > https://www.ibm.com/developerworks/data/library/ >> techarticle/dm-0711zubiri/ > > That article by Adriana is 6 years ago and was written actually while we > implemented MODULE’s

Re: [HACKERS] Packages: Again

2017-02-03 Thread Serge Rielau
> DB2 propose using schemas instead packages > > https://www.ibm.com/developerworks/data/library/techarticle/dm-0711zubiri/ > [https://www.ibm.com/developerworks/data/library/techarticle/dm-0711zubiri/] > That article by Adriana is 6 years ago and was written actually while we > implemented

Re: [HACKERS] Packages: Again

2017-02-02 Thread Pavel Stehule
2017-02-03 7:34 GMT+01:00 Craig Ringer : > On 3 February 2017 at 14:27, Pavel Stehule > wrote: > > > > > > 2017-01-20 17:01 GMT+01:00 Joshua D. Drake : > >> > >> On 01/17/2017 09:26 AM, Robert Haas wrote: > >>> > >>> On Fri,

Re: [HACKERS] Packages: Again

2017-02-02 Thread Craig Ringer
On 3 February 2017 at 14:27, Pavel Stehule wrote: > > > 2017-01-20 17:01 GMT+01:00 Joshua D. Drake : >> >> On 01/17/2017 09:26 AM, Robert Haas wrote: >>> >>> On Fri, Jan 13, 2017 at 7:24 PM, Peter Geoghegan wrote: MERGE

Re: [HACKERS] Packages: Again

2017-02-02 Thread Pavel Stehule
2017-01-20 17:01 GMT+01:00 Joshua D. Drake : > On 01/17/2017 09:26 AM, Robert Haas wrote: > >> On Fri, Jan 13, 2017 at 7:24 PM, Peter Geoghegan wrote: >> >>> MERGE isn't UPSERT, and isn't even in competition with UPSERT as a >>> feature. I've written

Re: [HACKERS] Packages: Again

2017-01-20 Thread Pavel Stehule
2017-01-20 17:01 GMT+01:00 Joshua D. Drake : > On 01/17/2017 09:26 AM, Robert Haas wrote: > >> On Fri, Jan 13, 2017 at 7:24 PM, Peter Geoghegan wrote: >> >>> MERGE isn't UPSERT, and isn't even in competition with UPSERT as a >>> feature. I've written

Re: [HACKERS] Packages: Again

2017-01-20 Thread Joshua D. Drake
On 01/17/2017 09:26 AM, Robert Haas wrote: On Fri, Jan 13, 2017 at 7:24 PM, Peter Geoghegan wrote: MERGE isn't UPSERT, and isn't even in competition with UPSERT as a feature. I've written reams of text explaining why this is so in precise detail, ... Hello, This is the

Re: [HACKERS] Packages: Again

2017-01-17 Thread Robert Haas
On Fri, Jan 13, 2017 at 7:24 PM, Peter Geoghegan wrote: > MERGE isn't UPSERT, and isn't even in competition with UPSERT as a > feature. I've written reams of text explaining why this is so in > precise detail, ... No matter how much text you write, I doubt that I will ever

Re: [HACKERS] Packages: Again

2017-01-16 Thread Jim Nasby
On 1/13/17 10:56 PM, Serge Rielau wrote: But what irks me in this debate is that any reasoned and detailed argumentation of value of the principle itself is shut down with un-reasoned and un-detailed one-liners. “I’m not convinced” is not an argument. Counterpoints require content. Something

Re: [HACKERS] Packages: Again

2017-01-14 Thread Peter Geoghegan
On Fri, Jan 13, 2017 at 8:56 PM, Serge Rielau wrote: >> That's total nonsense. >> >> MERGE isn't UPSERT…. > > Peter, > you are misreading what I wrote. I did not allege that PostgreSQL did the > wrong thing. And you are essentially confirming that there was debate and > MERGE

Re: [HACKERS] Packages: Again

2017-01-13 Thread Serge Rielau
On Fri, Jan 13, 2017 at 4:24 PM, Peter Geoghegan wrote: On Fri, Jan 13, 2017 at 3:44 PM, Serge Rielau wrote: > And sometimes the community DOES go its own way rather than implementing the > standard. For example by rejecting the MERGE statement in favor of

Re: [HACKERS] Packages: Again

2017-01-13 Thread Peter Geoghegan
On Fri, Jan 13, 2017 at 3:44 PM, Serge Rielau wrote: > And sometimes the community DOES go its own way rather than implementing the > standard. For example by rejecting the MERGE statement in favor of another > syntax and semantic. That's total nonsense. MERGE isn't UPSERT,

Re: [HACKERS] Packages: Again

2017-01-13 Thread Serge Rielau
On Fri, Jan 13, 2017 at 2:46 PM, Kevin Grittner wrote: On Fri, Jan 13, 2017 at 12:35 PM, Serge Rielau wrote: > Yes my proposal to nest schemata is “radical” and this community > is not falling into that camp. > But there is nothing holy about

Re: [HACKERS] Packages: Again

2017-01-13 Thread Kevin Grittner
On Fri, Jan 13, 2017 at 12:35 PM, Serge Rielau wrote: > Yes my proposal to nest schemata is “radical” and this community > is not falling into that camp. > But there is nothing holy about database.schema.object.attribute It is mandated by the U.S. and international SQL

Re: [HACKERS] Packages: Again

2017-01-13 Thread Pavel Stehule
2017-01-13 22:16 GMT+01:00 Serge Rielau : > On Fri, Jan 13, 2017 at 12:45 PM, Pavel Stehule > wrote: > > show patch and show a advantages against schema, please. > > I have tried to describe the advantage. > If the community doesn’t agree, that’s fine.

Re: [HACKERS] Packages: Again

2017-01-13 Thread Serge Rielau
On Fri, Jan 13, 2017 at 12:45 PM, Pavel Stehule wrote: show patch and show a advantages against schema, please. I have tried to describe the advantage. If the community doesn’t agree, that’s fine. I do not see how expending the effort of back porting a patch (and

Re: [HACKERS] Packages: Again

2017-01-13 Thread Pavel Stehule
2017-01-13 20:38 GMT+01:00 Serge Rielau : > > > On Jan 13, 2017, at 11:11 AM, Pavel Stehule > wrote: > > > > With Postgres we should to think much more about other PL - there is not > only PL/pgSQL. So any what we create should be available for any PL.

Re: [HACKERS] Packages: Again

2017-01-13 Thread Serge Rielau
> On Jan 13, 2017, at 11:11 AM, Pavel Stehule wrote: > > With Postgres we should to think much more about other PL - there is not only > PL/pgSQL. So any what we create should be available for any PL. Our PLpgSQL > is based on total different technology design - so

Re: [HACKERS] Packages: Again

2017-01-13 Thread Pavel Stehule
2017-01-13 19:35 GMT+01:00 Serge Rielau : > > > On Jan 13, 2017, at 10:23 AM, Pavel Stehule > wrote: > > > > I have not clean feeling from this - I am pretty sure so I am afraid > schizophrenic between MODULES, SCHEMAS. Nested schemas increase

Re: [HACKERS] Packages: Again

2017-01-13 Thread Serge Rielau
> On Jan 13, 2017, at 10:23 AM, Pavel Stehule wrote: > > I have not clean feeling from this - I am pretty sure so I am afraid > schizophrenic between MODULES, SCHEMAS. Nested schemas increase complexity > of searching complexity and breaks a logic

Re: [HACKERS] Packages: Again

2017-01-13 Thread Pavel Stehule
2017-01-13 18:35 GMT+01:00 Serge Rielau : > >> * A design that can fit in with PostgreSQL >> * Solid benefits beyond "makes life easier for Oracle users" to >> justify each feature/change >> * Funding/time to make it happen >> >> So far, I haven't seen anyone with one of those,

Re: [HACKERS] Packages: Again

2017-01-13 Thread Serge Rielau
> > * A design that can fit in with PostgreSQL > * Solid benefits beyond "makes life easier for Oracle users" to > justify each feature/change > * Funding/time to make it happen > > So far, I haven't seen anyone with one of those, let alone all three. OK, I’ll bite… * In SFDC’s extension of

Re: [HACKERS] Packages: Again

2017-01-13 Thread Wolfgang Wilhelm
Hello again, well, I didn't want to tell you to match in PostgreSQL the technical debt. If I made it look so, sorry for my bad english. No, a "free clone of Oracle" isn't my intention. I don't want to convince Oracle evangelists to use PostgreSQL. This is time wasted. But I'd prefer a project

Re: [HACKERS] Packages: Again

2017-01-13 Thread Pavel Stehule
2017-01-13 10:11 GMT+01:00 Craig Ringer : > On 13 January 2017 at 16:49, Wolfgang Wilhelm > wrote: > > - Devs just don't want to change (some) code. Everybody seems to have > code > > with huge technical debt which is best not to be touched. This

Re: [HACKERS] Packages: Again

2017-01-13 Thread Craig Ringer
On 13 January 2017 at 16:49, Wolfgang Wilhelm wrote: > - Devs just don't want to change (some) code. Everybody seems to have code > with huge technical debt which is best not to be touched. This code should > have an easy "move code from Oracle to PostgreSQL", best case

Re: [HACKERS] Packages: Again

2017-01-12 Thread Pavel Stehule
2017-01-13 3:07 GMT+01:00 Joshua D. Drake : > On 01/12/2017 03:35 PM, Craig Ringer wrote: > >> >> > >> So far that's all "that'd be nice, but isn't a technical barrier" stuff. >> >> Package variables for example. When _do_ you _need_ them? For what? (I'm >> aware of some

Re: [HACKERS] Packages: Again

2017-01-12 Thread Joshua D. Drake
On 01/12/2017 03:35 PM, Craig Ringer wrote: So far that's all "that'd be nice, but isn't a technical barrier" stuff. Package variables for example. When _do_ you _need_ them? For what? (I'm aware of some uses but "when you need them" helps us not at all). Well my answer would be,

Re: [HACKERS] Packages: Again

2017-01-12 Thread Craig Ringer
On 13 Jan. 2017 00:54, "Joshua D. Drake" wrote: On 01/11/2017 04:12 PM, Craig Ringer wrote: What aspects / features of packages were the key issues? > Unfortunately we didn't get too far into it because the webinar was about Postgres specifically. That said, I have been

Re: [HACKERS] Packages: Again

2017-01-12 Thread Joshua D. Drake
On 01/11/2017 04:12 PM, Craig Ringer wrote: What aspects / features of packages were the key issues? Unfortunately we didn't get too far into it because the webinar was about Postgres specifically. That said, I have been doing some followup. Here is some of it: because packages[1] o

Re: [HACKERS] Packages: Again

2017-01-11 Thread Craig Ringer
On 12 Jan. 2017 02:59, "Joshua D. Drake" wrote: -hackers, I know we have talked about this before but today it was impressed upon me rather firmly. I presented a Webinar: Postgres for Oracle People. The attendees were 90% pl/pgsql developers. 330 people registered for an

Re: [HACKERS] Packages: Again

2017-01-11 Thread Gilles Darold
Le 11/01/2017 à 20:32, Pavel Stehule a écrit : > > > 2017-01-11 19:57 GMT+01:00 Joshua D. Drake >: > > -hackers, > > I know we have talked about this before but today it was impressed > upon me rather firmly. I presented a

Re: [HACKERS] Packages: Again

2017-01-11 Thread Robert Haas
On Wed, Jan 11, 2017 at 3:56 PM, Joshua D. Drake wrote: >> We have a schemas instead - the PostgreSQL schema is close to Oracle >> packages. > > No. It isn't. I'm gonna say "yeah, it is". And that's all I will say about this topic. -- Robert Haas EnterpriseDB:

Re: [HACKERS] Packages: Again

2017-01-11 Thread Joshua D. Drake
On 01/11/2017 11:32 AM, Pavel Stehule wrote: We have a schemas instead - the PostgreSQL schema is close to Oracle packages. No. It isn't. A Package is essentially a class with dependencies. It has nothing to do with schemas outside of being named qualified. For example:

Re: [HACKERS] Packages: Again

2017-01-11 Thread Pavel Stehule
2017-01-11 21:08 GMT+01:00 Bruce Momjian : > On Wed, Jan 11, 2017 at 08:56:23PM +0100, Fabien COELHO wrote: > > > > >I think we need to focus on things that _can't_ be done first, rather > > >than things that require porting, e.g. until we had savepoints, you > > >couldn't

Re: [HACKERS] Packages: Again

2017-01-11 Thread Bruce Momjian
On Wed, Jan 11, 2017 at 03:08:58PM -0500, Bruce Momjian wrote: > On Wed, Jan 11, 2017 at 08:56:23PM +0100, Fabien COELHO wrote: > > > > >I think we need to focus on things that _can't_ be done first, rather > > >than things that require porting, e.g. until we had savepoints, you > > >couldn't

Re: [HACKERS] Packages: Again

2017-01-11 Thread Pavel Stehule
2017-01-11 20:56 GMT+01:00 Fabien COELHO : > > I think we need to focus on things that _can't_ be done first, rather >> than things that require porting, e.g. until we had savepoints, you >> couldn't migrate an application that needed it. It wasn't a question of >> porting

Re: [HACKERS] Packages: Again

2017-01-11 Thread Bruce Momjian
On Wed, Jan 11, 2017 at 08:56:23PM +0100, Fabien COELHO wrote: > > >I think we need to focus on things that _can't_ be done first, rather > >than things that require porting, e.g. until we had savepoints, you > >couldn't migrate an application that needed it. It wasn't a question of > >porting

Re: [HACKERS] Packages: Again

2017-01-11 Thread Stephen Frost
Fabien, * Fabien COELHO (coe...@cri.ensmp.fr) wrote: > >I think we need to focus on things that _can't_ be done first, rather > >than things that require porting, e.g. until we had savepoints, you > >couldn't migrate an application that needed it. It wasn't a question of > >porting --- there was

Re: [HACKERS] Packages: Again

2017-01-11 Thread Fabien COELHO
I think we need to focus on things that _can't_ be done first, rather than things that require porting, e.g. until we had savepoints, you couldn't migrate an application that needed it. It wasn't a question of porting --- there was just no way to port it. Those _missing_ pieces should be a

Re: [HACKERS] Packages: Again

2017-01-11 Thread Pavel Stehule
2017-01-11 20:42 GMT+01:00 Bruce Momjian : > On Wed, Jan 11, 2017 at 08:32:53PM +0100, Pavel Stehule wrote: > > Now I work on migration about 500K rows - and it is terrible work. It is > 20 > > years old project - lot of code is not clean, It is hard to migrate, it > is hard > >

Re: [HACKERS] Packages: Again

2017-01-11 Thread Fabien COELHO
We have a schemas instead - the PostgreSQL schema is close to Oracle packages. Yes, a schema is a kind of a "namespace"-level package. Pg also has extensions, which is a group things put together, which may also contribute to packaging. What we cannot to substitute are package variables,

Re: [HACKERS] Packages: Again

2017-01-11 Thread Bruce Momjian
On Wed, Jan 11, 2017 at 08:32:53PM +0100, Pavel Stehule wrote: > Now I work on migration about 500K rows - and it is terrible work. It is 20 > years old project - lot of code is not clean, It is hard to migrate, it is > hard > to clean. Sure, there is not one line of tests. > > If we miss some,

Re: [HACKERS] Packages: Again

2017-01-11 Thread Pavel Stehule
2017-01-11 19:57 GMT+01:00 Joshua D. Drake : > -hackers, > > I know we have talked about this before but today it was impressed upon me > rather firmly. I presented a Webinar: Postgres for Oracle People. The > attendees were 90% pl/pgsql developers. 330 people registered

Re: [HACKERS] Packages: Again

2017-01-11 Thread Bruce Momjian
On Wed, Jan 11, 2017 at 10:57:58AM -0800, Joshua Drake wrote: > -hackers, > > I know we have talked about this before but today it was impressed upon me > rather firmly. I presented a Webinar: Postgres for Oracle People. The > attendees were 90% pl/pgsql developers. 330 people registered for an