Re: [HACKERS] createlang/droplang deprecated

2017-03-23 Thread Euler Taveira
2017-03-18 12:29 GMT-03:00 Tom Lane :

>
> But createuser/dropuser are a real problem, because they certainly could
> be mistaken for system-level utilities.


I proposed something along those lines [1] to fix this historical mistake
but we didn't reach a consensus. createuser/dropuser could be a candidate
to removal because it is easily replaced by psql -c "command here" like
Simon said. If we go to this road, other binaries (that are just a wrapper
around an SQL command) could be removed too (such as createdb, dropdb,
clusterdb and reindexdb).


[1]
https://www.postgresql.org/message-id/bdd1adb1-c26d-ad1f-2f15-cc5205606...@timbira.com.br


-- 
   Euler Taveira   Timbira -
http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento



Re: [HACKERS] createlang/droplang deprecated

2017-03-23 Thread Peter Eisentraut
On 3/23/17 06:41, Daniel Gustafsson wrote:
>> On 20 Mar 2017, at 01:37, Peter Eisentraut 
>>  wrote:
>>
>> On 3/18/17 09:00, Peter Eisentraut wrote:
>>> I just noticed that createlang and droplang have been listed as
>>> deprecated since PG 9.1.
>>>
>>> Do we dare remove them?
>>
>> Patch
> 
> LGTM, +1

Committed.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] createlang/droplang deprecated

2017-03-23 Thread Daniel Gustafsson
> On 20 Mar 2017, at 01:37, Peter Eisentraut  
> wrote:
> 
> On 3/18/17 09:00, Peter Eisentraut wrote:
>> I just noticed that createlang and droplang have been listed as
>> deprecated since PG 9.1.
>> 
>> Do we dare remove them?
> 
> Patch

LGTM, +1

cheers ./daniel

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] createlang/droplang deprecated

2017-03-23 Thread Magnus Hagander
On Mon, Mar 20, 2017 at 1:37 AM, Peter Eisentraut <
peter.eisentr...@2ndquadrant.com> wrote:

> On 3/18/17 09:00, Peter Eisentraut wrote:
> > I just noticed that createlang and droplang have been listed as
> > deprecated since PG 9.1.
> >
> > Do we dare remove them?
>
> Patch
>
>
+1


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


Re: [HACKERS] createlang/droplang deprecated

2017-03-19 Thread Peter Eisentraut
On 3/18/17 09:00, Peter Eisentraut wrote:
> I just noticed that createlang and droplang have been listed as
> deprecated since PG 9.1.
> 
> Do we dare remove them?

Patch

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From 3ae8367b933d02246a305432a411236d309a2060 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut 
Date: Sat, 18 Mar 2017 23:34:52 -0400
Subject: [PATCH] Remove createlang and droplang

They have been deprecated since PostgreSQL 9.1.
---
 doc/src/sgml/installation.sgml|  12 +-
 doc/src/sgml/plperl.sgml  |   3 +-
 doc/src/sgml/plpython.sgml|   3 +-
 doc/src/sgml/pltcl.sgml   |   7 +-
 doc/src/sgml/ref/allfiles.sgml|   2 -
 doc/src/sgml/ref/create_function.sgml |   1 -
 doc/src/sgml/ref/create_language.sgml |  15 +-
 doc/src/sgml/ref/createlang.sgml  | 291 --
 doc/src/sgml/ref/drop_language.sgml   |   1 -
 doc/src/sgml/ref/droplang.sgml| 288 -
 doc/src/sgml/reference.sgml   |   2 -
 doc/src/sgml/release-9.1.sgml |   4 +-
 doc/src/sgml/xplang.sgml  |   9 +-
 src/bin/scripts/.gitignore|   2 -
 src/bin/scripts/Makefile  |   6 +-
 src/bin/scripts/createlang.c  | 251 -
 src/bin/scripts/droplang.c| 250 -
 src/bin/scripts/nls.mk|   4 +-
 src/bin/scripts/t/030_createlang.pl   |  25 ---
 src/bin/scripts/t/060_droplang.pl |  23 ---
 src/tools/msvc/Install.pm |   4 +-
 21 files changed, 21 insertions(+), 1182 deletions(-)
 delete mode 100644 doc/src/sgml/ref/createlang.sgml
 delete mode 100644 doc/src/sgml/ref/droplang.sgml
 delete mode 100644 src/bin/scripts/createlang.c
 delete mode 100644 src/bin/scripts/droplang.c
 delete mode 100644 src/bin/scripts/t/030_createlang.pl
 delete mode 100644 src/bin/scripts/t/060_droplang.pl

diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index 79201b78e3..f8a222e637 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -2256,17 +2256,17 @@ Memory Management
  memory management.  You can have a server with many multiples of
  gigabytes of RAM free, but still get out of memory or address
  space errors when running applications.  One example
- is createlang failing with unusual errors.
+ is loading of extensions failing with unusual errors.
  For example, running as the owner of the PostgreSQL installation:
 
--bash-3.00$ createlang plperl template1
-createlang: language installation failed: ERROR:  could not load library "/opt/dbs/pgsql748/lib/plperl.so": A memory address is not in the address space for the process.
+=# CREATE EXTENSION plperl;
+ERROR:  could not load library "/opt/dbs/pgsql/lib/plperl.so": A memory address is not in the address space for the process.
 
 Running as a non-owner in the group possessing the PostgreSQL
 installation:
 
--bash-3.00$ createlang plperl template1
-createlang: language installation failed: ERROR:  could not load library "/opt/dbs/pgsql748/lib/plperl.so": Bad address
+=# CREATE EXTENSION plperl;
+ERROR:  could not load library "/opt/dbs/pgsql/lib/plperl.so": Bad address
 
  Another example is out of memory errors in the PostgreSQL server
  logs, with every memory allocation near or greater than 256 MB
@@ -2284,7 +2284,7 @@ Memory Management
 
 
 
- In the case of the createlang example, above,
+ In the case of the plperl example, above,
  check your umask and the permissions of the binaries in your
  PostgreSQL installation.  The binaries involved in that example
  were 32-bit and installed as mode 750 instead of 755.  Due to the
diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml
index 9117769125..dd2ffbc6ce 100644
--- a/doc/src/sgml/plperl.sgml
+++ b/doc/src/sgml/plperl.sgml
@@ -27,8 +27,7 @@ PL/Perl - Perl Procedural Language
 
   
To install PL/Perl in a particular database, use
-   CREATE EXTENSION plperl, or from the shell command line use
-   createlang plperl dbname.
+   CREATE EXTENSION plperl.
   
 
   
diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml
index 46397781be..fb5d336efc 100644
--- a/doc/src/sgml/plpython.sgml
+++ b/doc/src/sgml/plpython.sgml
@@ -14,8 +14,7 @@ PL/Python - Python Procedural Language
 
  
   To install PL/Python in a particular database, use
-  CREATE EXTENSION plpythonu, or from the shell command line use
-  createlang plpythonu dbname (but
+  CREATE EXTENSION plpythonu (but
   see also ).
  
 
diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml
index ed745a7481..ba4af2aec5 100644
--- a/doc/src/sgml/pltcl.sgml
+++ b/doc/src/sgml/pltcl.sgml
@@ -66,10 +66,9 @@ Overview
 directory if Tcl support is specified in the configuration step of
 

Re: [HACKERS] createlang/droplang deprecated

2017-03-19 Thread David Steele

On 3/18/17 9:00 AM, Peter Eisentraut wrote:

I just noticed that createlang and droplang have been listed as
deprecated since PG 9.1.

Do we dare remove them?


+1

--
-David
da...@pgmasters.net


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] createlang/droplang deprecated

2017-03-18 Thread Magnus Hagander
On Sat, Mar 18, 2017 at 6:13 PM, Robert Haas  wrote:

> On Sat, Mar 18, 2017 at 11:29 AM, Tom Lane  wrote:
> > Magnus Hagander  writes:
> >>> 2017-03-18 14:00 GMT+01:00 Peter Eisentraut <
> peter.eisentr...@2ndquadrant.com>:
>  I just noticed that createlang and droplang have been listed as
>  deprecated since PG 9.1.
>  Do we dare remove them?
> >
> >> (I'd extend it to all the non-prefixed pg binaries, but let's open that
> can
> >> of worms right now, one thing at a time)
> >
> > To my mind, these two and createuser/dropuser are the only really serious
> > namespacing problems among our standard binaries.  The ones with names
> > ending in "db" don't seem likely to cause huge confusion.  I suppose that
> > if we were naming it today, "psql" wouldn't get that name; but the
> chances
> > of renaming that one are certainly zero, namespace conflict or no.
> >
> > But createuser/dropuser are a real problem, because they certainly could
> > be mistaken for system-level utilities.
>
> Well, let's do one thing at a time.  I think it'd be fine to drop
> createlang and droplang; we can discuss other things on other threads.
>

+1. I see no issues at all dropping createlang/droplang, so let's do that.
Some of the others can be worth discussing, so let's not wait for that to
pan out before these are removed.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


Re: [HACKERS] createlang/droplang deprecated

2017-03-18 Thread Robert Haas
On Sat, Mar 18, 2017 at 11:29 AM, Tom Lane  wrote:
> Magnus Hagander  writes:
>>> 2017-03-18 14:00 GMT+01:00 Peter Eisentraut 
>>> :
 I just noticed that createlang and droplang have been listed as
 deprecated since PG 9.1.
 Do we dare remove them?
>
>> (I'd extend it to all the non-prefixed pg binaries, but let's open that can
>> of worms right now, one thing at a time)
>
> To my mind, these two and createuser/dropuser are the only really serious
> namespacing problems among our standard binaries.  The ones with names
> ending in "db" don't seem likely to cause huge confusion.  I suppose that
> if we were naming it today, "psql" wouldn't get that name; but the chances
> of renaming that one are certainly zero, namespace conflict or no.
>
> But createuser/dropuser are a real problem, because they certainly could
> be mistaken for system-level utilities.

Well, let's do one thing at a time.  I think it'd be fine to drop
createlang and droplang; we can discuss other things on other threads.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] createlang/droplang deprecated

2017-03-18 Thread Tom Lane
Magnus Hagander  writes:
>> 2017-03-18 14:00 GMT+01:00 Peter Eisentraut 
>> :
>>> I just noticed that createlang and droplang have been listed as
>>> deprecated since PG 9.1.
>>> Do we dare remove them?

> (I'd extend it to all the non-prefixed pg binaries, but let's open that can
> of worms right now, one thing at a time)

To my mind, these two and createuser/dropuser are the only really serious
namespacing problems among our standard binaries.  The ones with names
ending in "db" don't seem likely to cause huge confusion.  I suppose that
if we were naming it today, "psql" wouldn't get that name; but the chances
of renaming that one are certainly zero, namespace conflict or no.

But createuser/dropuser are a real problem, because they certainly could
be mistaken for system-level utilities.

regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] createlang/droplang deprecated

2017-03-18 Thread Magnus Hagander
On Sat, Mar 18, 2017 at 3:09 PM, Pavel Stehule 
wrote:

>
>
> 2017-03-18 14:00 GMT+01:00 Peter Eisentraut  com>:
>
>> I just noticed that createlang and droplang have been listed as
>> deprecated since PG 9.1.
>>
>> Do we dare remove them?
>>
>
> +1
>
>
+1.

(I'd extend it to all the non-prefixed pg binaries, but let's open that can
of worms right now, one thing at a time)

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


Re: [HACKERS] createlang/droplang deprecated

2017-03-18 Thread Pavel Stehule
2017-03-18 14:00 GMT+01:00 Peter Eisentraut <
peter.eisentr...@2ndquadrant.com>:

> I just noticed that createlang and droplang have been listed as
> deprecated since PG 9.1.
>
> Do we dare remove them?
>

+1

Pavel


>
> --
> Peter Eisentraut  http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>