Re: [GENERAL] Where to find development builds of pg for windows

2017-10-28 Thread Karsten Hilbert
On Sat, Oct 28, 2017 at 02:18:52AM -0700, legrand legrand wrote:

> Subject: Re: [GENERAL] Where to find development builds of pg for windows
...
> I will be [...] pg 10 new features testing

You can't because it's released. If you need dev builds of
PG10 you'll probably have to roll them yourself from the VCS.

https://www.postgresql.org/download/snapshots/

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


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


Re: [GENERAL] Where to find development builds of pg for windows

2017-10-28 Thread legrand legrand
Thanks,

Yes I will be busy with pg 10 new features testing ;o)

Nb: I also have installed a unix partition to be able to test non-core
extensions and prototypes

Regards
PAscal



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html


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


Re: [GENERAL] Where to find development builds of pg for windows

2017-10-27 Thread Jeff Janes
On Sat, Oct 14, 2017 at 12:18 AM, legrand legrand <
legrand_legr...@hotmail.com> wrote:

> Hello,
>
> Using PG mainly on windows, I would have liked to test new releases /
> development versions before they are available in
> https://www.postgresql.org/download/windows/
>
> Are there some build farms or places where I could find "build snapshots
> for
> windows" without having to build them by myself ?
>

I don't know of nightlies available for Window.  But you can find
pre-release
(beta and release candidates) binaries here when they are in season:

https://www.enterprisedb.com/products-services-training/pgdevdownload

(As linked from https://www.postgresql.org/download/snapshots/)

But since v10 was just released, it will be a long time before the next
beta (for v11) is out.

Cheers,

Jeff


Re: [GENERAL] Where is pg_hba.conf

2017-08-14 Thread Arthur Zakirov
Hello,

On Sun, Aug 13, 2017 at 10:00:23AM -0400, Igor Korot wrote:
> However, I can't find this file anywhere on the system.
> I am able to connec to the server locally with psql. I can also
> connect to the server
> from the ODBC driver from my program. However doing a global search I
> can't find that file.
> 
> Can someone please help?

You can execute the query:

=# select setting from pg_settings where name = 'hba_file';

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


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


Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread George Neuner
On Sun, 13 Aug 2017 10:55:00 -0400, Igor Korot 
wrote:

>Also, I presume that the address in this file is the address of the
>machine where the server is located, not the address from where the
>connection is initiated.

No.  The addresses / network segments in the file specify from where
the client(s) can connect.

George



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


Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread David G. Johnston
On Sunday, August 13, 2017, Igor Korot  wrote:

> Also, I presume that the address in this file is the address of the
> machine where the server is located, not the address from where the
> connection is initiated.
>

Not according to the docs.

https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html

David J.


Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread Igor Korot
Also, I presume that the address in this file is the address of the
machine where the server is located, not the address from where the
connection is initiated.


On Sun, Aug 13, 2017 at 10:53 AM, Igor Korot  wrote:
> Hi,
> OK, I found it under the root account.
>
> Now I am modifying it as follows:
>
> # TYPE  DATABASEUSERADDRESS METHOD
>
> # "local" is for Unix domain socket connections only
> local   all all md5
> # IPv4 local connections:
> hostall all 192.168.1.3/32md5
> # IPv6 local connections:
> hostall all ::1/128 md5
> # Allow replication connections from localhost, by a user with the
> # replication privilege.
> #local   replication postgresmd5
> #hostreplication postgres127.0.0.1/32md5
> #hostreplication postgres::1/128 md5
>
> Should "METHOD" column be lept as 'md5' or as 'trusted' as in the link
> I posted in the OP?
>
> Thank you.
>
>
> On Sun, Aug 13, 2017 at 10:37 AM, Christoph Berg  wrote:
>> Re: Igor Korot 2017-08-13 
>> 
>>> draft=# SHOW hba_file
>>> draft-# SHOW hba_file;
>>>  ERROR:  syntax error at or near "SHOW"
>>> LINE 2: SHOW hba_file;
>>> ^
>>
>> Standard beginners error. If you forgot the ";" on the first line,
>> it'll process both lines as a single, erroneous command. Note the
>> "-#" prompt.
>>
>> If you run into that situation again, hit ^C.
>>
>> Christoph


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


Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread Igor Korot
Hi,
OK, I found it under the root account.

Now I am modifying it as follows:

# TYPE  DATABASEUSERADDRESS METHOD

# "local" is for Unix domain socket connections only
local   all all md5
# IPv4 local connections:
hostall all 192.168.1.3/32md5
# IPv6 local connections:
hostall all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication postgresmd5
#hostreplication postgres127.0.0.1/32md5
#hostreplication postgres::1/128 md5

Should "METHOD" column be lept as 'md5' or as 'trusted' as in the link
I posted in the OP?

Thank you.


On Sun, Aug 13, 2017 at 10:37 AM, Christoph Berg  wrote:
> Re: Igor Korot 2017-08-13 
> 
>> draft=# SHOW hba_file
>> draft-# SHOW hba_file;
>>  ERROR:  syntax error at or near "SHOW"
>> LINE 2: SHOW hba_file;
>> ^
>
> Standard beginners error. If you forgot the ";" on the first line,
> it'll process both lines as a single, erroneous command. Note the
> "-#" prompt.
>
> If you run into that situation again, hit ^C.
>
> Christoph


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


Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread Christoph Berg
Re: Igor Korot 2017-08-13 

> draft=# SHOW hba_file
> draft-# SHOW hba_file;
>  ERROR:  syntax error at or near "SHOW"
> LINE 2: SHOW hba_file;
> ^

Standard beginners error. If you forgot the ";" on the first line,
it'll process both lines as a single, erroneous command. Note the
"-#" prompt.

If you run into that situation again, hit ^C.

Christoph


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


Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread Igor Korot
Hi, armand,

On Sun, Aug 13, 2017 at 10:12 AM, armand pirvu  wrote:
> Normally should reside in the data dir. My case below
>
> armandps-MacBook-Air:~ armandp$ ps -fu postgres |grep data
>   502 29591 1   0 Thu09PM ?? 0:01.63
> /Library/PostgreSQL/9.6/bin/postgres -D /Library/PostgreSQL/9.6/data
>
> armandps-MacBook-Air:~ armandp$ ls -l
> /Library/PostgreSQL/9.6/data/pg_hba.conf
> ls: /Library/PostgreSQL/9.6/data/pg_hba.conf: Permission denied
> armandps-MacBook-Air:~ armandp$ sudo ls -l
> /Library/PostgreSQL/9.6/data/pg_hba.conf
> -rw---  1 postgres  daemon  4248 Aug 10 21:17
> /Library/PostgreSQL/9.6/data/pg_hba.conf
>
> Is it possible that global search fails from a permission error ?

MyMac:/ igorkorot$ ps -fu postgres |grep data
  50277 1   0 11:38PM ?? 0:00.45
/Library/PostgreSQL/9.1/bin/postmaster -D/Library/PostgreSQL/9.1/data
  502  1733   243   0 10:42AM ?? 0:00.05
/System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdworker
-s mdworker -c MDSImporterWorker -m com.apple.mdworker.shared
MyMac:/ igorkorot$ ls -la /Library/PostgreSQL/9.1/data/
ls: : Permission denied
MyMac:/ igorkorot$ su
Password:
sh-3.2# ls -la /Library/PostgreSQL/9.1/data/
total 88
drwx--   20 postgres  daemon680 Aug 12 23:38 .
drwxr-xr-x   16 root  daemon544 Dec  4  2016 ..
-rw---1 postgres  daemon  4 Dec  4  2016 PG_VERSION
drwx--7 postgres  daemon238 Dec  9  2016 base
drwx--   42 postgres  daemon   1428 Aug 12 23:39 global
drwx--3 postgres  daemon102 Dec  4  2016 pg_clog
-rw---1 postgres  daemon   4222 Dec  4  2016 pg_hba.conf
-rw---1 postgres  daemon   1636 Dec  4  2016 pg_ident.conf
drwxr-xr-x  204 postgres  daemon   6936 Aug 13 00:00 pg_log
drwx--4 postgres  daemon136 Dec  4  2016 pg_multixact
drwx--3 postgres  daemon102 Aug 12 23:38 pg_notify
drwx--2 postgres  daemon 68 Dec  4  2016 pg_serial
drwx--3 postgres  daemon102 Aug 13 10:43 pg_stat_tmp
drwx--3 postgres  daemon102 Dec  4  2016 pg_subtrans
drwx--2 postgres  daemon 68 Dec  4  2016 pg_tblspc
drwx--2 postgres  daemon 68 Dec  4  2016 pg_twophase
drwx--5 postgres  daemon170 Dec 11  2016 pg_xlog
-rw-r--r--1 postgres  daemon  19162 Dec  4  2016 postgresql.conf
-rw---1 postgres  daemon 70 Aug 12 23:38 postmaster.opts
-rw---1 postgres  daemon 75 Aug 12 23:38 postmaster.pid
sh-3.2#

Apparently it looks like the failure is from the permission.

So how do I enable it? Or it has to stay for "root" only?

Thank you.

>
> Hope this helps
>
>
>
> On Aug 13, 2017, at 9:00 AM, Igor Korot  wrote:
>
> Hi,
> I have a Mac with OSX 10.8 installed. It has Postgre 9.1.
> According to
> https://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html
> and
> http://www.thegeekstuff.com/2014/02/enable-remote-postgresql-connection/?utm_source=tuicool
> I need to modify the pg_hba.conf file to get access to the DB
> remotely.
>
> However, I can't find this file anywhere on the system.
> I am able to connec to the server locally with psql. I can also
> connect to the server
> from the ODBC driver from my program. However doing a global search I
> can't find that file.
>
> Can someone please help?
>
> Thank you.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>


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


Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread Igor Korot
Hi, Christoph,

On Sun, Aug 13, 2017 at 10:09 AM, Christoph Berg  wrote:
> Re: Igor Korot 2017-08-13 
> 
>> I need to modify the pg_hba.conf file to get access to the DB
>> remotely.
>>
>> However, I can't find this file anywhere on the system.
>
> Try "SHOW hba_file;".

Last login: Sat Aug 12 23:49:33 on ttys000
/Library/PostgreSQL/9.1/scripts/runpsql.sh; exit
MyMac:~ igorkorot$ /Library/PostgreSQL/9.1/scripts/runpsql.sh; exit
Server [localhost]:
Database [postgres]: draft
Port [5432]:
Username [postgres]:
Password for user postgres:
psql (9.1.24)
Type "help" for help.

draft=# SHOW hba_file
draft-# SHOW hba_file;
 ERROR:  syntax error at or near "SHOW"
LINE 2: SHOW hba_file;
^

Thank you.

>
> Christoph


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


Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread armand pirvu
Normally should reside in the data dir. My case below

armandps-MacBook-Air:~ armandp$ ps -fu postgres |grep data
  502 29591 1   0 Thu09PM ?? 0:01.63 
/Library/PostgreSQL/9.6/bin/postgres -D /Library/PostgreSQL/9.6/data

armandps-MacBook-Air:~ armandp$ ls -l /Library/PostgreSQL/9.6/data/pg_hba.conf
ls: /Library/PostgreSQL/9.6/data/pg_hba.conf: Permission denied
armandps-MacBook-Air:~ armandp$ sudo ls -l 
/Library/PostgreSQL/9.6/data/pg_hba.conf
-rw---  1 postgres  daemon  4248 Aug 10 21:17 
/Library/PostgreSQL/9.6/data/pg_hba.conf

Is it possible that global search fails from a permission error ?

Hope this helps



> On Aug 13, 2017, at 9:00 AM, Igor Korot  wrote:
> 
> Hi,
> I have a Mac with OSX 10.8 installed. It has Postgre 9.1.
> According to https://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html
> and 
> http://www.thegeekstuff.com/2014/02/enable-remote-postgresql-connection/?utm_source=tuicool
> I need to modify the pg_hba.conf file to get access to the DB
> remotely.
> 
> However, I can't find this file anywhere on the system.
> I am able to connec to the server locally with psql. I can also
> connect to the server
> from the ODBC driver from my program. However doing a global search I
> can't find that file.
> 
> Can someone please help?
> 
> Thank you.
> 
> 
> -- 
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general



Re: [GENERAL] Where is pg_hba.conf

2017-08-13 Thread Christoph Berg
Re: Igor Korot 2017-08-13 

> I need to modify the pg_hba.conf file to get access to the DB
> remotely.
> 
> However, I can't find this file anywhere on the system.

Try "SHOW hba_file;".

Christoph


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


Re: [GENERAL] Where is the error?

2017-05-07 Thread Christoph Moench-Tegeder
## Igor Korot (ikoro...@gmail.com):

> Another question - do I have to do "DECLARE CURSOR..." or I can just write
> a normal SELECT query?
> For this I followed and example on the libpg page...

Yes. In fact, "libpq Example Program 3" on
https://www.postgresql.org/docs/current/static/libpq-example.html
does exactly that.

Regards,
Christoph

-- 
Spare Space


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


Re: [GENERAL] Where is the error?

2017-05-06 Thread Igor Korot
Hi, Christoph,



On May 6, 2017 2:24 PM, "Christoph Moench-Tegeder" 
wrote:

## Igor Korot (ikoro...@gmail.com):

> std::string query1 = "DECLARE alltables CURSOR SELECT
> table_schema, table_name FROM information_schema.tables WHERE
> table_type = 'BASE TABLE' OR table_type = 'VIEW' OR table_type =
> 'LOCAL TEMPORARY';";

> [quote]
> RROR:  syntax error at or near "SELECT"
> LINE 1: DECLARE alltables CURSOR SELECT table_schema, table_name FRO...

> What am I missing?

A "FOR" in front of the "SELECT":
https://www.postgresql.org/docs/current/static/sql-declare.html


Another question - do I have to do "DECLARE CURSOR..." or I can just write
a normal SELECT query?
For this I followed and example on the libpg page...

Thank you.



Note you can use cursors via psql, too - only they have to be in a
transaction block (but postgres will tell you, once you got the
syntax right).

Regards,
Christoph

--
Spare Space


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


Re: [GENERAL] Where is the error?

2017-05-06 Thread Christoph Moench-Tegeder
## Igor Korot (ikoro...@gmail.com):

> std::string query1 = "DECLARE alltables CURSOR SELECT
> table_schema, table_name FROM information_schema.tables WHERE
> table_type = 'BASE TABLE' OR table_type = 'VIEW' OR table_type =
> 'LOCAL TEMPORARY';";

> [quote]
> RROR:  syntax error at or near "SELECT"
> LINE 1: DECLARE alltables CURSOR SELECT table_schema, table_name FRO...

> What am I missing?

A "FOR" in front of the "SELECT":
https://www.postgresql.org/docs/current/static/sql-declare.html

Note you can use cursors via psql, too - only they have to be in a
transaction block (but postgres will tell you, once you got the
syntax right).

Regards,
Christoph

-- 
Spare Space


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


Re: [GENERAL] Where is the libpg on OSX?

2017-05-04 Thread Adrian Klaver

On 05/04/2017 08:54 PM, Igor Korot wrote:

Hi, ALL,

[code]
Igors-MacBook-Air:/ igorkorot$ find . -name *libpg*


Pretty sure what you are looking for is libpq:

https://www.postgresql.org/docs/9.6/static/libpq.html




And then doing this:
[code]
Igors-MacBook-Air:/ igorkorot$ pg_config --libs
-lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm
[/code]

Thank you.

P.S.: Server is running and I can successfully connect to it.
FWIW, I'm running OSX 10.8.





--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] Where would I be able to get instructions regarding postgresql installation on Windows 10?

2016-12-04 Thread Melvin Davidson
Just click on the version of Win x-86 32 PostgreSQL you want from here and
use the downloaded installer.

http://www.enterprisedb.com/products-services-training/pgdownload#windows

On Sun, Dec 4, 2016 at 7:57 PM, Varuna Seneviratna <
varunasenevira...@gmail.com> wrote:

> Hello,
> I looked through the documentation But was not able to find any
> information. If possible please guide me
>
> Varuna
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] Where to download pgbench for Windows 7

2016-12-03 Thread James Zhou
Thank you, John.

On Dec 2, 2016 23:12, "John R Pierce"  wrote:

> On 12/2/2016 10:37 PM, James Zhou wrote:
>
>> I am new to PostgreSQL and am leaning it. I installed PostgreSQL on a
>> Windows 7 laptop and would like to play with pgbench to generate a sample
>> database and a bit load.
>>
>> As I read, pgbench should come with the server download. But after I
>> install it, I could find pgbench:
>>
>
> its a command line program. at CMD ('dos prompt'), try...
>
>   D:\Postgresql\9.5\bin\pgbench --help
>
> (replace that path with wherever you installed the eDB postgres package)
>
>
>
> --
> john r pierce, recycling bits in santa cruz
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>


Re: [GENERAL] Where to download pgbench for Windows 7

2016-12-02 Thread John R Pierce

On 12/2/2016 10:37 PM, James Zhou wrote:
I am new to PostgreSQL and am leaning it. I installed PostgreSQL on a 
Windows 7 laptop and would like to play with pgbench to generate a 
sample database and a bit load.


As I read, pgbench should come with the server download. But after I 
install it, I could find pgbench:


its a command line program. at CMD ('dos prompt'), try...

  D:\Postgresql\9.5\bin\pgbench --help

(replace that path with wherever you installed the eDB postgres package)



--
john r pierce, recycling bits in santa cruz



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


Re: [GENERAL] WHERE ... IN condition and multiple columns in subquery

2016-10-29 Thread Alexander Farber
Thank you for the advices and I have also got few answers at

http://stackoverflow.com/questions/40304011/where-in-condition-and-multiple-columns-in-subquery

Regards
Alex


Re: [GENERAL] WHERE ... IN condition and multiple columns in subquery

2016-10-28 Thread Alban Hertroys
On 28 October 2016 at 13:03, Alexander Farber
 wrote:
> Hello,
>
> is it please possible to rewrite the SQL query
>
> SELECT DISTINCT ON (uid)
> uid,
> female,
> given,
> photo,
> place
> FROM words_social
> WHERE uid IN (SELECT player1 FROM games)
> OR uid IN (SELECT player2 FROM games)
> ORDER BY uid, stamp DESC
>
> where first column player1 is fetched in a subquery and then column player2
> is fetched from the same table?
>
> I've searched around and it seems that a JOIN should be used here, but can
> not figure out exactly how.
>
> Thank you
> Alex

You mean like this?:

 SELECT DISTINCT ON (uid)
 uid,
 female,
 given,
 photo,
 place
 FROM words_social
 JOIN games ON uid IN (player1, player2)
 ORDER BY uid, stamp DESC


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


Re: [GENERAL] WHERE ... IN condition and multiple columns in subquery

2016-10-28 Thread Geoff Winkless
On 28 October 2016 at 12:03, Alexander Farber 
wrote:

> is it please possible to rewrite the SQL query
>
> SELECT DISTINCT ON (uid)
> uid,
> female,
> given,
> photo,
> place
> FROM words_social
> WHERE uid IN (SELECT player1 FROM games)
> OR uid IN (SELECT player2 FROM games)
> ORDER BY uid, stamp DESC
>
> where first column player1 is fetched in a subquery and then column
> player2 is fetched from the same table?
>

You could use

​WHERE EXISTS (SELECT FROM games WHERE player1=uid OR player2=uid)

although as Tom says, it's dubious whether that will result in a
significant speedup.

Geoff​


Re: [GENERAL] WHERE ... IN condition and multiple columns in subquery

2016-10-28 Thread Tom Lane
Alexander Farber  writes:
> is it please possible to rewrite the SQL query

> SELECT DISTINCT ON (uid)
> uid,
> female,
> given,
> photo,
> place
> FROM words_social
> WHERE uid IN (SELECT player1 FROM games)
> OR uid IN (SELECT player2 FROM games)
> ORDER BY uid, stamp DESC

You could do

WHERE uid IN (SELECT player1 FROM games UNION SELECT player2 FROM games)

(or possibly UNION ALL would be a trifle faster).  This still reads the
"games" CTE twice; but since you're evaluating that CTE elsewhere in the
query, I think the additional follower node isn't worth trying to get
rid of.

regards, tom lane


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


Re: [GENERAL] Where do I enter commands?

2015-10-26 Thread Josip Rodin
On Sun, Oct 25, 2015 at 07:57:48AM -0700, David Blomstrom wrote:
> I can see PostgreSQL is going to have a learning curve - hopefully shorter
> than the years it took me to learn MySQL - but it looks interesting. The
> community seems painfully small compared to MySQL, and there are less
> online resources.

There might be a causal relation between your first and your second
sentence ;) more stuff doesn't always mean more quality stuff.

The community size discrepancy really isn't that bad these days.
http://stackoverflow.com/questions/tagged/mysql - 350k
http://stackoverflow.com/questions/tagged/postgresql - 45k
Obviously the former number is larger, but it's not necessarily going to be
relevant since the latter number is large enough to support the vast
majority of typical questions that a newcomer is likely to have.

And that's just for that one site (albeit a very popular one) - Google
searches for typical PostgreSQL questions will often turn up fine answers
from the archives of this mailing list.

-- 
 2. That which causes joy or happiness.


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


Re: [GENERAL] Where do I enter commands?

2015-10-26 Thread Alexander Reichstadt
Hello David,

This cookbook has worked for me for the last five years on Mac OS X, always and 
totally reliable up to incl. El Capitan and every intermittent release before. 
And most of all, it worked even as a repair measure. So if my server would stop 
working after a small Mac Os X update, I took these steps, and without 
migrations it just worked again then:

1. google

enterprise Postgres installer

2. hit the first link, follow your intuition on where you get until you 
download the binary for the platform you want
3. install postgres and then launch package maker
4. in package maker, you can scroll down and navigate to the category web 
development, and there select phpPgAdmin with apache
5. run the installation, it is going to install a special instance of apache 
only for phpPgAdmin
6. it will guide you through to the end including to select a port and website 
to connect to, just hit return 'til the whole things shuts up and gives you the 
summary page
7. make a screenshot for your files, log on trough a web browser, you will see, 
it explains itself

Note 1: depending on where you want to allow logons from to your page, this is 
another chapter, but actually quite straight forward.

Note 2: Given you are in the middle of another approach, this might fail now. 
Regardless of any prior data you have, disregard it until here. Once the server 
is running, you have the next piece to cover and it is normally quite easy to 
do then.

I did also both, Mysql and Postgres, and even though it seemed a little less 
intuitive at first, and even though I find a waste of time in any matter 
aggravating, there is a host of reasons it was a very good and time saving 
decision in the long run to have switched and thus gained access to tons of 
features mysql does not offer, not to mention the license giving you freedom 
mysql is never going to be able to offer.

Finally of that, I have rarely found an open source community as supportive and 
responsive as the postgres community, you can measure that against premium 
service of some providers who charge you money for it. Hang in there for the 
start, it is going to be rewarding.

Hope this helps your decision process
Alex


> On 25 Oct 2015, at 1:28 p.m., Adrian Klaver  wrote:
> 
> On 10/24/2015 09:19 PM, David Blomstrom wrote:
>> I'm a writer. I studied programing and MySQL so I could create websites
>> that I can publish my articles to. I don't have time to keep up with the
>> endless technology - MySQL, PDO, stored procedures, PHP, JavaScript,
>> JQuery, and on and on - especially when I have to work for a living.
>> I've been using MySQL for years, so I'm familiar with it. It therefore
>> makes sense for me to find a GUI as similar to MySQL as possible.
>> 
>> With phpMyAdmin, I can easily create, modify, copy and migrate tables
>> between databases. If that can be done as easily with a
>> command-line-tool, even after surviving the learning curve, then I'm
>> interested. But it's really hard to imagine how that could be.
> 
> pgAdmin will allow you to do those things. phpPgAdmin also, though I have 
> never used it, so I can not be of much help there. The predominate command 
> line tool folks are referring to is psql:
> 
> http://www.postgresql.org/docs/9.4/interactive/app-psql.html
> 
> For dumping databases or their contained objects there is pg_dump:
> 
> http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html
> 
> for restoring non-plain text dumps there is pg_restore
> 
> http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html
> 
> for plain text dumps just use psql.
> 
> These three programs will cover most of your use cases. The benefit to using 
> these tools is that you end of working with scripts that then can be put 
> under version control. Takes a little bit of time to set up but the payoff is 
> worth it for anything above the really simple level.
> 
>> 
>> Thanks for the tips.
>> 
>> On Sat, Oct 24, 2015 at 9:07 PM, Adrian Klaver
>> > wrote:
>> 
>>On 10/24/2015 08:52 PM, Rob Sargent wrote:
>> 
>>ok. now who has the url to the pithy
>>heres-why-you-/really/-want-the-command-line.
>> 
>>It distills to something about actually knowing what you’re doing.
>> 
>> 
>>Everyone has to start somewhere. The point is get someone using
>>Postgres in manner they are comfortable with, then they can start
>>exploring the possibilities. I personally find the command line more
>>productive, but there is a learning curve.
>> 
>> 
>> 
>> 
>> 
>>--
>>Adrian Klaver
>>adrian.kla...@aklaver.com 
>> 
>> 
>> 
>> 
>> --
>> David Blomstrom
>> Writer & Web Designer (Mac, M$ & Linux)
>> www.geobop.org 
> 
> 
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
> 
> 
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes 

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Andrew Sullivan
On Sat, Oct 24, 2015 at 07:33:15PM -0700, David Blomstrom wrote:
> It seems like a command-line tool would be
> incredibly tedious when creating tables, modifying them, filling them with
> data, etc.

For whatever it's worth, I find quite the opposite: once you have the
hang of the command line, it is so much more efficient for these
things (you can script everything up in your favourite editor) that I
find I never go back to the GUI unless I need diagrams and so on.

I think the others in the thread are giving you the right
instructions, so I've nothing to add on the GUI.  But do consider
trying out the command line.  You'll be surprised at the power you get
once the initial learning curve is over.

A


-- 
Andrew Sullivan
a...@crankycanuck.ca


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


Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Joshua D. Drake

On 10/24/2015 09:19 PM, David Blomstrom wrote:

I'm a writer. I studied programing and MySQL so I could create websites
that I can publish my articles to. I don't have time to keep up with the
endless technology - MySQL, PDO, stored procedures, PHP, JavaScript,
JQuery, and on and on - especially when I have to work for a living.
I've been using MySQL for years, so I'm familiar with it. It therefore
makes sense for me to find a GUI as similar to MySQL as possible.

With phpMyAdmin, I can easily create, modify, copy and migrate tables
between databases. If that can be done as easily with a
command-line-tool, even after surviving the learning curve, then I'm
interested. But it's really hard to imagine how that could be.

Thanks for the tips.


I would ignore Rob, he obviously is suffering from a lack of coffee. Our 
community always tries to help new users. It is great to see you here.


Sincerely,

JD


--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.


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


Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Melvin Davidson
Since you are just starting, you should probably familarize yourself with
how PgAdmin works with PostgreSQL.
Therefore, it is best you refer to the documentation for PgAdmin.

PgAdmin III
http://www.pgadmin.org/docs/1.20/index.html

I also suggest you obtain a copy of one, or both, of the following two
books to help you with PostgreSQL.

Beginning Databases with PostgreSQL: From Novice to Professional
http://www.amazon.com/gp/product/1590594789?keywords=postgresql=1445778326_=sr_1_3=books=1-3

PostgreSQL Administration Essentials
http://www.amazon.com/gp/product/1783988983?keywords=postgresql=1445778326_=sr_1_7=books=1-7

You can also find a very extensive listing of other books about PostgreSQL
here:

http://www.postgresql.org/docs/books/

On Sun, Oct 25, 2015 at 5:21 AM, Joshua D. Drake 
wrote:

> On 10/24/2015 09:19 PM, David Blomstrom wrote:
>
>> I'm a writer. I studied programing and MySQL so I could create websites
>> that I can publish my articles to. I don't have time to keep up with the
>> endless technology - MySQL, PDO, stored procedures, PHP, JavaScript,
>> JQuery, and on and on - especially when I have to work for a living.
>> I've been using MySQL for years, so I'm familiar with it. It therefore
>> makes sense for me to find a GUI as similar to MySQL as possible.
>>
>> With phpMyAdmin, I can easily create, modify, copy and migrate tables
>> between databases. If that can be done as easily with a
>> command-line-tool, even after surviving the learning curve, then I'm
>> interested. But it's really hard to imagine how that could be.
>>
>> Thanks for the tips.
>>
>
> I would ignore Rob, he obviously is suffering from a lack of coffee. Our
> community always tries to help new users. It is great to see you here.
>
> Sincerely,
>
> JD
>
>
> --
> Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
> PostgreSQL Centered full stack support, consulting and development.
> Announcing "I'm offended" is basically telling the world you can't
> control your own emotions, so everyone else should do it for you.
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Adrian Klaver

On 10/24/2015 09:19 PM, David Blomstrom wrote:

I'm a writer. I studied programing and MySQL so I could create websites
that I can publish my articles to. I don't have time to keep up with the
endless technology - MySQL, PDO, stored procedures, PHP, JavaScript,
JQuery, and on and on - especially when I have to work for a living.
I've been using MySQL for years, so I'm familiar with it. It therefore
makes sense for me to find a GUI as similar to MySQL as possible.

With phpMyAdmin, I can easily create, modify, copy and migrate tables
between databases. If that can be done as easily with a
command-line-tool, even after surviving the learning curve, then I'm
interested. But it's really hard to imagine how that could be.


pgAdmin will allow you to do those things. phpPgAdmin also, though I 
have never used it, so I can not be of much help there. The predominate 
command line tool folks are referring to is psql:


http://www.postgresql.org/docs/9.4/interactive/app-psql.html

For dumping databases or their contained objects there is pg_dump:

http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html

for restoring non-plain text dumps there is pg_restore

http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html

for plain text dumps just use psql.

These three programs will cover most of your use cases. The benefit to 
using these tools is that you end of working with scripts that then can 
be put under version control. Takes a little bit of time to set up but 
the payoff is worth it for anything above the really simple level.




Thanks for the tips.

On Sat, Oct 24, 2015 at 9:07 PM, Adrian Klaver
> wrote:

On 10/24/2015 08:52 PM, Rob Sargent wrote:

ok. now who has the url to the pithy
heres-why-you-/really/-want-the-command-line.

It distills to something about actually knowing what you’re doing.


Everyone has to start somewhere. The point is get someone using
Postgres in manner they are comfortable with, then they can start
exploring the possibilities. I personally find the command line more
productive, but there is a learning curve.





--
Adrian Klaver
adrian.kla...@aklaver.com 




--
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org 



--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread David Blomstrom
It's hard to imagine creating a table with a command-line tool - in the
step-by-step process I use with phpMyAdmin, that is. If you can learn the
proper syntax for creating a table and put together a script for a generic
table that you can easily modify, then maybe it would be a lot easier with
a command-line tool.

In phpMyAdmin, I've become accustomed to simply copying existing tables,
then adding, deleting and renaming columns as needed.

I can see PostgreSQL is going to have a learning curve - hopefully shorter
than the years it took me to learn MySQL - but it looks interesting. The
community seems painfully small compared to MySQL, and there are less
online resources. But I'm guessing that will change in the coming years. I
remember when CSS was a strange, foreign thing. ;)

On Sun, Oct 25, 2015 at 6:28 AM, Adrian Klaver 
wrote:

> On 10/24/2015 09:19 PM, David Blomstrom wrote:
>
>> I'm a writer. I studied programing and MySQL so I could create websites
>> that I can publish my articles to. I don't have time to keep up with the
>> endless technology - MySQL, PDO, stored procedures, PHP, JavaScript,
>> JQuery, and on and on - especially when I have to work for a living.
>> I've been using MySQL for years, so I'm familiar with it. It therefore
>> makes sense for me to find a GUI as similar to MySQL as possible.
>>
>> With phpMyAdmin, I can easily create, modify, copy and migrate tables
>> between databases. If that can be done as easily with a
>> command-line-tool, even after surviving the learning curve, then I'm
>> interested. But it's really hard to imagine how that could be.
>>
>
> pgAdmin will allow you to do those things. phpPgAdmin also, though I have
> never used it, so I can not be of much help there. The predominate command
> line tool folks are referring to is psql:
>
> http://www.postgresql.org/docs/9.4/interactive/app-psql.html
>
> For dumping databases or their contained objects there is pg_dump:
>
> http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html
>
> for restoring non-plain text dumps there is pg_restore
>
> http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html
>
> for plain text dumps just use psql.
>
> These three programs will cover most of your use cases. The benefit to
> using these tools is that you end of working with scripts that then can be
> put under version control. Takes a little bit of time to set up but the
> payoff is worth it for anything above the really simple level.
>
>
>> Thanks for the tips.
>>
>> On Sat, Oct 24, 2015 at 9:07 PM, Adrian Klaver
>> > wrote:
>>
>> On 10/24/2015 08:52 PM, Rob Sargent wrote:
>>
>> ok. now who has the url to the pithy
>> heres-why-you-/really/-want-the-command-line.
>>
>> It distills to something about actually knowing what you’re doing.
>>
>>
>> Everyone has to start somewhere. The point is get someone using
>> Postgres in manner they are comfortable with, then they can start
>> exploring the possibilities. I personally find the command line more
>> productive, but there is a learning curve.
>>
>>
>>
>>
>>
>> --
>> Adrian Klaver
>> adrian.kla...@aklaver.com 
>>
>>
>>
>>
>> --
>> David Blomstrom
>> Writer & Web Designer (Mac, M$ & Linux)
>> www.geobop.org 
>>
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>



-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org


Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread David Blomstrom
Wow, great tips; you answered a question I was about to post either here or
on a forum. One question, though.

Someone said when you add a new column in Postgre, it's appended to the end
of the table. Does that mean that's where it has to stay, or can you
rearrange columns, as in MySQL?

On Sun, Oct 25, 2015 at 8:14 AM, Alexander Reichstadt 
wrote:

> Hello David,
>
> This cookbook has worked for me for the last five years on Mac OS X,
> always and totally reliable up to incl. El Capitan and every intermittent
> release before. And most of all, it worked even as a repair measure. So if
> my server would stop working after a small Mac Os X update, I took these
> steps, and without migrations it just worked again then:
>
> 1. google
>
> enterprise Postgres installer
>
> 2. hit the first link, follow your intuition on where you get until you
> download the binary for the platform you want
> 3. install postgres and then launch package maker
> 4. in package maker, you can scroll down and navigate to the category web
> development, and there select phpPgAdmin with apache
> 5. run the installation, it is going to install a special instance of
> apache only for phpPgAdmin
> 6. it will guide you through to the end including to select a port and
> website to connect to, just hit return 'til the whole things shuts up and
> gives you the summary page
> 7. make a screenshot for your files, log on trough a web browser, you will
> see, it explains itself
>
> Note 1: depending on where you want to allow logons from to your page,
> this is another chapter, but actually quite straight forward.
>
> Note 2: Given you are in the middle of another approach, this might fail
> now. Regardless of any prior data you have, disregard it until here. Once
> the server is running, you have the next piece to cover and it is normally
> quite easy to do then.
>
> I did also both, Mysql and Postgres, and even though it seemed a little
> less intuitive at first, and even though I find a waste of time in any
> matter aggravating, there is a host of reasons it was a very good and time
> saving decision in the long run to have switched and thus gained access to
> tons of features mysql does not offer, not to mention the license giving
> you freedom mysql is never going to be able to offer.
>
> Finally of that, I have rarely found an open source community as
> supportive and responsive as the postgres community, you can measure that
> against premium service of some providers who charge you money for it. Hang
> in there for the start, it is going to be rewarding.
>
> Hope this helps your decision process
> Alex
>
>
> > On 25 Oct 2015, at 1:28 p.m., Adrian Klaver 
> wrote:
> >
> > On 10/24/2015 09:19 PM, David Blomstrom wrote:
> >> I'm a writer. I studied programing and MySQL so I could create websites
> >> that I can publish my articles to. I don't have time to keep up with the
> >> endless technology - MySQL, PDO, stored procedures, PHP, JavaScript,
> >> JQuery, and on and on - especially when I have to work for a living.
> >> I've been using MySQL for years, so I'm familiar with it. It therefore
> >> makes sense for me to find a GUI as similar to MySQL as possible.
> >>
> >> With phpMyAdmin, I can easily create, modify, copy and migrate tables
> >> between databases. If that can be done as easily with a
> >> command-line-tool, even after surviving the learning curve, then I'm
> >> interested. But it's really hard to imagine how that could be.
> >
> > pgAdmin will allow you to do those things. phpPgAdmin also, though I
> have never used it, so I can not be of much help there. The predominate
> command line tool folks are referring to is psql:
> >
> > http://www.postgresql.org/docs/9.4/interactive/app-psql.html
> >
> > For dumping databases or their contained objects there is pg_dump:
> >
> > http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html
> >
> > for restoring non-plain text dumps there is pg_restore
> >
> > http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html
> >
> > for plain text dumps just use psql.
> >
> > These three programs will cover most of your use cases. The benefit to
> using these tools is that you end of working with scripts that then can be
> put under version control. Takes a little bit of time to set up but the
> payoff is worth it for anything above the really simple level.
> >
> >>
> >> Thanks for the tips.
> >>
> >> On Sat, Oct 24, 2015 at 9:07 PM, Adrian Klaver
> >> > wrote:
> >>
> >>On 10/24/2015 08:52 PM, Rob Sargent wrote:
> >>
> >>ok. now who has the url to the pithy
> >>heres-why-you-/really/-want-the-command-line.
> >>
> >>It distills to something about actually knowing what you’re
> doing.
> >>
> >>
> >>Everyone has to start somewhere. The point is get someone using
> >>Postgres in manner they are comfortable with, then they can start
> >>

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Andrew Sullivan
On Sun, Oct 25, 2015 at 07:57:48AM -0700, David Blomstrom wrote:
> In phpMyAdmin, I've become accustomed to simply copying existing tables,
> then adding, deleting and renaming columns as needed.

Oh!  Interesting.  I suspect you're actually _undermining_ your
ability to use the database (because often when you copy a table it's
a sign that you're using the database like a spreadsheet, and you're
giving up a lot of functionality that way).

But, suppose you're wanting to do that, then here's the easy way to do
it:

--- if you want the same table structure without the data

CREATE TABLE newtable AS SELECT * FROM oldtable WHERE 1=0;

-- if you want the same table with some data

CREATE TABLE newtable AS SELECT columns, you, want, in, order
FROM oldtable
[WHERE conditions];

If you want only some columns or new order or something, the WHERE
clause in the latter statement should be 1=0.  It makes a null set
always.  Handy trick.

> I can see PostgreSQL is going to have a learning curve - hopefully shorter
> than the years it took me to learn MySQL - but it looks interesting.

It should be much easier.  You have the basics from MySQL already.
Consistency and rigour are the changes ;-)

A

-- 
Andrew Sullivan
a...@crankycanuck.ca


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


Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Rob Sargent

> On Oct 25, 2015, at 3:21 AM, Joshua D. Drake  wrote:
> 
> I would ignore Rob, he obviously is suffering from a lack of coffee. Our 
> community always tries to help new users. It is great to see you here.
> 
> Sincerely,
> 
> JD
> 

Always the best advice :)

OK, Coffee’d up now.  Apologies for my grumpiness. The rest of the thread says 
it much more nicely.




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


Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread David Blomstrom
No problem. I'm pretty grumpy when people invade MY turf - biology and
education reform. As a former Seattle teacher who spent sixteen years in
the meat grinder before becoming a whistle-blower, I've seen it all - and I
know it all. ;)

On Sun, Oct 25, 2015 at 8:41 AM, Karsten Hilbert 
wrote:

> On Sun, Oct 25, 2015 at 08:32:43AM -0700, David Blomstrom wrote:
>
> > Someone said when you add a new column in Postgre, it's appended to the
> end
> > of the table. Does that mean that's where it has to stay, or can you
> > rearrange columns
>
> No, unless you drop/re-create the table (manually or with
>
> pg_dump -t 
>
> But you can use a view over the table to show a desired
> column order if you so wish.
>
> Karsten
> --
> GPG key ID E4071346 @ eu.pool.sks-keyservers.net
> E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org


Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Adrian Klaver

On 10/25/2015 07:57 AM, David Blomstrom wrote:

It's hard to imagine creating a table with a command-line tool - in the
step-by-step process I use with phpMyAdmin, that is. If you can learn
the proper syntax for creating a table and put together a script for a
generic table that you can easily modify, then maybe it would be a lot
easier with a command-line tool.

In phpMyAdmin, I've become accustomed to simply copying existing tables,
then adding, deleting and renaming columns as needed.


In psql:

test=> CREATE TABLE orig_test(id integer, fld_1 varchar, fld_2 boolean, 
fld_3 numeric(7,3));

CREATE TABLE

test=> \d orig_test
Table "public.orig_test"
Column | Type | Modifiers
+---+---
id | integer |
fld_1 | character varying |
fld_2 | boolean |
fld_3 | numeric(7,3) |

test=> create table cp_test AS select * from orig_test ;
SELECT 0

test=> \d cp_test
Table "public.cp_test"
Column | Type | Modifiers
+---+---
id | integer |
fld_1 | character varying |
fld_2 | boolean |
fld_3 | numeric(7,3) |

test=> alter table cp_test add column fld_4 date;
ALTER TABLE
test=> \d cp_test
 Table "public.cp_test"
 Column |   Type| Modifiers
+---+---
 id | integer   |
 fld_1  | character varying |
 fld_2  | boolean   |
 fld_3  | numeric(7,3)  |
 fld_4  | date  |

One note, in Postgres new columns will always be added to end of table.



I can see PostgreSQL is going to have a learning curve - hopefully
shorter than the years it took me to learn MySQL - but it looks
interesting. The community seems painfully small compared to MySQL, and
there are less online resources. But I'm guessing that will change in
the coming years. I remember when CSS was a strange, foreign thing. ;)


Last time I there was a count on the people on this mailing list I 
remember a number of 33,000-34,000.




On Sun, Oct 25, 2015 at 6:28 AM, Adrian Klaver
> wrote:

On 10/24/2015 09:19 PM, David Blomstrom wrote:

I'm a writer. I studied programing and MySQL so I could create
websites
that I can publish my articles to. I don't have time to keep up
with the
endless technology - MySQL, PDO, stored procedures, PHP, JavaScript,
JQuery, and on and on - especially when I have to work for a living.
I've been using MySQL for years, so I'm familiar with it. It
therefore
makes sense for me to find a GUI as similar to MySQL as possible.

With phpMyAdmin, I can easily create, modify, copy and migrate
tables
between databases. If that can be done as easily with a
command-line-tool, even after surviving the learning curve, then I'm
interested. But it's really hard to imagine how that could be.


pgAdmin will allow you to do those things. phpPgAdmin also, though I
have never used it, so I can not be of much help there. The
predominate command line tool folks are referring to is psql:

http://www.postgresql.org/docs/9.4/interactive/app-psql.html

For dumping databases or their contained objects there is pg_dump:

http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html

for restoring non-plain text dumps there is pg_restore

http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html

for plain text dumps just use psql.

These three programs will cover most of your use cases. The benefit
to using these tools is that you end of working with scripts that
then can be put under version control. Takes a little bit of time to
set up but the payoff is worth it for anything above the really
simple level.


Thanks for the tips.

On Sat, Oct 24, 2015 at 9:07 PM, Adrian Klaver

>> wrote:

 On 10/24/2015 08:52 PM, Rob Sargent wrote:

 ok. now who has the url to the pithy
 heres-why-you-/really/-want-the-command-line.

 It distills to something about actually knowing what
you’re doing.


 Everyone has to start somewhere. The point is get someone using
 Postgres in manner they are comfortable with, then they can
start
 exploring the possibilities. I personally find the command
line more
 productive, but there is a learning curve.





 --
 Adrian Klaver
adrian.kla...@aklaver.com 
>




--
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org  



--

Re: [GENERAL] Where do I enter commands?

2015-10-25 Thread Karsten Hilbert
On Sun, Oct 25, 2015 at 08:32:43AM -0700, David Blomstrom wrote:

> Someone said when you add a new column in Postgre, it's appended to the end
> of the table. Does that mean that's where it has to stay, or can you
> rearrange columns

No, unless you drop/re-create the table (manually or with

pg_dump -t 

But you can use a view over the table to show a desired
column order if you so wish.

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


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


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread John R Pierce

On 10/24/2015 7:33 PM, David Blomstrom wrote:
I'd greatly prefer a GUI. It seems like a command-line tool would be 
incredibly tedious when creating tables, modifying them, filling them 
with data, etc. Thanks.




normally, your application programs do the data filling part, manual 
data entry direct via sql is fairly uncommon.


anyways, the GUI is pgAdmin, and you can create a database by opening 
the server, and selecting 'new database...', give it an owner, etc.   
then open that database, find hte Public schema therewithin, and create 
your table(s) in that schema...


--
john r pierce, recycling bits in santa cruz



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


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread Adrian Klaver

On 10/24/2015 07:44 PM, David Blomstrom wrote:

Hmmm...I have pgAdminIII. When I click on Server, there's no option to
create a database.


I would spend some time here:

http://www.pgadmin.org/docs/1.20/index.html

before going much further, just to get the gist of pgAdmin.

In the meantime, you have to connect to the Server before you can create 
anything on it. Is there a entry under Servers?




On Sat, Oct 24, 2015 at 7:37 PM, John R Pierce > wrote:

On 10/24/2015 7:33 PM, David Blomstrom wrote:

I'd greatly prefer a GUI. It seems like a command-line tool
would be incredibly tedious when creating tables, modifying
them, filling them with data, etc. Thanks.


normally, your application programs do the data filling part, manual
data entry direct via sql is fairly uncommon.

anyways, the GUI is pgAdmin, and you can create a database by
opening the server, and selecting 'new database...', give it an
owner, etc.   then open that database, find hte Public schema
therewithin, and create your table(s) in that schema...

--
john r pierce, recycling bits in santa cruz



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




--
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org 



--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread David Blomstrom
Good tip; I can now see the database I created. Thanks.

On Sat, Oct 24, 2015 at 8:20 PM, Adrian Klaver 
wrote:

> On 10/24/2015 08:00 PM, David Blomstrom wrote:
>
>> "Is there a entry under Servers?"
>>
>> PostgreSQL 9.5 (localhost) - but there's a red X over it.
>>
>
> That means you are not connected to the Server. Right click on the entry
> and select Connect. It will probably ask for a password, which should be
> the database password you created when you did the install.
>
>
>> On Sat, Oct 24, 2015 at 7:52 PM, Adrian Klaver
>> > wrote:
>>
>> On 10/24/2015 07:44 PM, David Blomstrom wrote:
>>
>> Hmmm...I have pgAdminIII. When I click on Server, there's no
>> option to
>> create a database.
>>
>>
>> I would spend some time here:
>>
>> http://www.pgadmin.org/docs/1.20/index.html
>>
>> before going much further, just to get the gist of pgAdmin.
>>
>> In the meantime, you have to connect to the Server before you can
>> create anything on it. Is there a entry under Servers?
>>
>>
>> On Sat, Oct 24, 2015 at 7:37 PM, John R Pierce
>> 
>> >> wrote:
>>
>>  On 10/24/2015 7:33 PM, David Blomstrom wrote:
>>
>>  I'd greatly prefer a GUI. It seems like a command-line
>> tool
>>  would be incredibly tedious when creating tables,
>> modifying
>>  them, filling them with data, etc. Thanks.
>>
>>
>>  normally, your application programs do the data filling
>> part, manual
>>  data entry direct via sql is fairly uncommon.
>>
>>  anyways, the GUI is pgAdmin, and you can create a database by
>>  opening the server, and selecting 'new database...', give it
>> an
>>  owner, etc.   then open that database, find hte Public schema
>>  therewithin, and create your table(s) in that schema...
>>
>>  --
>>  john r pierce, recycling bits in santa cruz
>>
>>
>>
>>  --
>>  Sent via pgsql-general mailing list
>> (pgsql-general@postgresql.org > pgsql-general@postgresql.org>
>>  > >)
>>  To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>>
>>
>>
>>
>> --
>> David Blomstrom
>> Writer & Web Designer (Mac, M$ & Linux)
>> www.geobop.org  
>>
>>
>>
>> --
>> Adrian Klaver
>> adrian.kla...@aklaver.com 
>>
>>
>>
>>
>> --
>> David Blomstrom
>> Writer & Web Designer (Mac, M$ & Linux)
>> www.geobop.org 
>>
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>



-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread Rob Sargent
ok. now who has the url to the pithy 
heres-why-you-really-want-the-command-line.  

It distills to something about actually knowing what you’re doing.


> On Oct 24, 2015, at 9:29 PM, David Blomstrom  
> wrote:
> 
> Good tip; I can now see the database I created. Thanks.
> 
> On Sat, Oct 24, 2015 at 8:20 PM, Adrian Klaver  > wrote:
> On 10/24/2015 08:00 PM, David Blomstrom wrote:
> "Is there a entry under Servers?"
> 
> PostgreSQL 9.5 (localhost) - but there's a red X over it.
> 
> That means you are not connected to the Server. Right click on the entry and 
> select Connect. It will probably ask for a password, which should be the 
> database password you created when you did the install.
> 
> 
> On Sat, Oct 24, 2015 at 7:52 PM, Adrian Klaver
>  
> >> wrote:
> 
> On 10/24/2015 07:44 PM, David Blomstrom wrote:
> 
> Hmmm...I have pgAdminIII. When I click on Server, there's no
> option to
> create a database.
> 
> 
> I would spend some time here:
> 
> http://www.pgadmin.org/docs/1.20/index.html 
> 
> 
> before going much further, just to get the gist of pgAdmin.
> 
> In the meantime, you have to connect to the Server before you can
> create anything on it. Is there a entry under Servers?
> 
> 
> On Sat, Oct 24, 2015 at 7:37 PM, John R Pierce
>  
> >
>  
>  
>  On 10/24/2015 7:33 PM, David Blomstrom wrote:
> 
>  I'd greatly prefer a GUI. It seems like a command-line tool
>  would be incredibly tedious when creating tables, modifying
>  them, filling them with data, etc. Thanks.
> 
> 
>  normally, your application programs do the data filling
> part, manual
>  data entry direct via sql is fairly uncommon.
> 
>  anyways, the GUI is pgAdmin, and you can create a database by
>  opening the server, and selecting 'new database...', give it an
>  owner, etc.   then open that database, find hte Public schema
>  therewithin, and create your table(s) in that schema...
> 
>  --
>  john r pierce, recycling bits in santa cruz
> 
> 
> 
>  --
>  Sent via pgsql-general mailing list
> (pgsql-general@postgresql.org  
> >
>   
>  >>)
>  To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general 
> 
> 
> 
> 
> 
> --
> David Blomstrom
> Writer & Web Designer (Mac, M$ & Linux)
> www.geobop.org   > >
> 
> 
> 
> --
> Adrian Klaver
> adrian.kla...@aklaver.com  
> >
> 
> 
> 
> 
> --
> David Blomstrom
> Writer & Web Designer (Mac, M$ & Linux)
> www.geobop.org   >
> 
> 
> -- 
> Adrian Klaver
> adrian.kla...@aklaver.com 
> 
> 
> 
> -- 
> David Blomstrom
> Writer & Web Designer (Mac, M$ & Linux)
> www.geobop.org 


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread Adrian Klaver

On 10/24/2015 06:21 PM, David Blomstrom wrote:

I just installed PostgreSQL and started reading the tutorial @
http://www.postgresql.org/docs/8.0/static/tutorial-createdb.html and was
snowed at square one. To create a database, I'm supposed to type the
following command:

$  createdb mydb

But it doesn't say where I'm supposed to type it. When I click on the
PostgreSQL icon in my taskbar, a program called pgAdminIII opens up.
I've clicked File, Edit, Plugins, etc., but I don't see any clues about
where I'm supposed to type commands.


So lets backup up a bit:

1) What OS are you on?

2) How did you install Postgres?

3) What version of Postgres?
Hope it is not 8.0 implied by the doc link above.


--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread David Blomstrom
"Is there a entry under Servers?"

PostgreSQL 9.5 (localhost) - but there's a red X over it.

On Sat, Oct 24, 2015 at 7:52 PM, Adrian Klaver 
wrote:

> On 10/24/2015 07:44 PM, David Blomstrom wrote:
>
>> Hmmm...I have pgAdminIII. When I click on Server, there's no option to
>> create a database.
>>
>
> I would spend some time here:
>
> http://www.pgadmin.org/docs/1.20/index.html
>
> before going much further, just to get the gist of pgAdmin.
>
> In the meantime, you have to connect to the Server before you can create
> anything on it. Is there a entry under Servers?
>
>
>> On Sat, Oct 24, 2015 at 7:37 PM, John R Pierce > > wrote:
>>
>> On 10/24/2015 7:33 PM, David Blomstrom wrote:
>>
>> I'd greatly prefer a GUI. It seems like a command-line tool
>> would be incredibly tedious when creating tables, modifying
>> them, filling them with data, etc. Thanks.
>>
>>
>> normally, your application programs do the data filling part, manual
>> data entry direct via sql is fairly uncommon.
>>
>> anyways, the GUI is pgAdmin, and you can create a database by
>> opening the server, and selecting 'new database...', give it an
>> owner, etc.   then open that database, find hte Public schema
>> therewithin, and create your table(s) in that schema...
>>
>> --
>> john r pierce, recycling bits in santa cruz
>>
>>
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-general@postgresql.org
>> )
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>>
>>
>>
>>
>> --
>> David Blomstrom
>> Writer & Web Designer (Mac, M$ & Linux)
>> www.geobop.org 
>>
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>



-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread Adrian Klaver

On 10/24/2015 08:00 PM, David Blomstrom wrote:

"Is there a entry under Servers?"

PostgreSQL 9.5 (localhost) - but there's a red X over it.


That means you are not connected to the Server. Right click on the entry 
and select Connect. It will probably ask for a password, which should be 
the database password you created when you did the install.




On Sat, Oct 24, 2015 at 7:52 PM, Adrian Klaver
> wrote:

On 10/24/2015 07:44 PM, David Blomstrom wrote:

Hmmm...I have pgAdminIII. When I click on Server, there's no
option to
create a database.


I would spend some time here:

http://www.pgadmin.org/docs/1.20/index.html

before going much further, just to get the gist of pgAdmin.

In the meantime, you have to connect to the Server before you can
create anything on it. Is there a entry under Servers?


On Sat, Oct 24, 2015 at 7:37 PM, John R Pierce

>> wrote:

 On 10/24/2015 7:33 PM, David Blomstrom wrote:

 I'd greatly prefer a GUI. It seems like a command-line tool
 would be incredibly tedious when creating tables, modifying
 them, filling them with data, etc. Thanks.


 normally, your application programs do the data filling
part, manual
 data entry direct via sql is fairly uncommon.

 anyways, the GUI is pgAdmin, and you can create a database by
 opening the server, and selecting 'new database...', give it an
 owner, etc.   then open that database, find hte Public schema
 therewithin, and create your table(s) in that schema...

 --
 john r pierce, recycling bits in santa cruz



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




--
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org  



--
Adrian Klaver
adrian.kla...@aklaver.com 




--
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org 



--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread Adrian Klaver

On 10/24/2015 08:52 PM, Rob Sargent wrote:

ok. now who has the url to the pithy
heres-why-you-/really/-want-the-command-line.

It distills to something about actually knowing what you’re doing.


Everyone has to start somewhere. The point is get someone using Postgres 
in manner they are comfortable with, then they can start exploring the 
possibilities. I personally find the command line more productive, but 
there is a learning curve.








--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread David Blomstrom
I'm on a Mac running OS X El Capitain. I think I installed PostgreSQL 9.5
after following the links to
http://www.enterprisedb.com/products-services-training/pgdownload#osx

I just learned about phpPGAdmin and installed it as well. But when I
navigate to localhost/phppgadmin, I get a "not found" error message.

On Sat, Oct 24, 2015 at 6:35 PM, Adrian Klaver 
wrote:

> On 10/24/2015 06:21 PM, David Blomstrom wrote:
>
>> I just installed PostgreSQL and started reading the tutorial @
>> http://www.postgresql.org/docs/8.0/static/tutorial-createdb.html and was
>> snowed at square one. To create a database, I'm supposed to type the
>> following command:
>>
>> $  createdb mydb
>>
>> But it doesn't say where I'm supposed to type it. When I click on the
>> PostgreSQL icon in my taskbar, a program called pgAdminIII opens up.
>> I've clicked File, Edit, Plugins, etc., but I don't see any clues about
>> where I'm supposed to type commands.
>>
>
> So lets backup up a bit:
>
> 1) What OS are you on?
>
> 2) How did you install Postgres?
>
> 3) What version of Postgres?
> Hope it is not 8.0 implied by the doc link above.
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>



-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread Adrian Klaver

On 10/24/2015 07:20 PM, David Blomstrom wrote:

I'm on a Mac running OS X El Capitain. I think I installed PostgreSQL
9.5 after following the links to
http://www.enterprisedb.com/products-services-training/pgdownload#osx


Well the tutorial is geared to using the command line to run programs.

Are you comfortable with the command line or would you prefer to use a 
GUI like pgAdmin?




I just learned about phpPGAdmin and installed it as well. But when I
navigate to localhost/phppgadmin, I get a "not found" error message.

On Sat, Oct 24, 2015 at 6:35 PM, Adrian Klaver
> wrote:

On 10/24/2015 06:21 PM, David Blomstrom wrote:

I just installed PostgreSQL and started reading the tutorial @
http://www.postgresql.org/docs/8.0/static/tutorial-createdb.html
and was
snowed at square one. To create a database, I'm supposed to type the
following command:

$  createdb mydb

But it doesn't say where I'm supposed to type it. When I click
on the
PostgreSQL icon in my taskbar, a program called pgAdminIII opens up.
I've clicked File, Edit, Plugins, etc., but I don't see any
clues about
where I'm supposed to type commands.


So lets backup up a bit:

1) What OS are you on?

2) How did you install Postgres?

3) What version of Postgres?
Hope it is not 8.0 implied by the doc link above.


--
Adrian Klaver
adrian.kla...@aklaver.com 




--
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org 



--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread David Blomstrom
Hmmm...I have pgAdminIII. When I click on Server, there's no option to
create a database.

On Sat, Oct 24, 2015 at 7:37 PM, John R Pierce  wrote:

> On 10/24/2015 7:33 PM, David Blomstrom wrote:
>
>> I'd greatly prefer a GUI. It seems like a command-line tool would be
>> incredibly tedious when creating tables, modifying them, filling them with
>> data, etc. Thanks.
>>
>>
> normally, your application programs do the data filling part, manual data
> entry direct via sql is fairly uncommon.
>
> anyways, the GUI is pgAdmin, and you can create a database by opening the
> server, and selecting 'new database...', give it an owner, etc.   then open
> that database, find hte Public schema therewithin, and create your table(s)
> in that schema...
>
> --
> john r pierce, recycling bits in santa cruz
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread David Blomstrom
I'd greatly prefer a GUI. It seems like a command-line tool would be
incredibly tedious when creating tables, modifying them, filling them with
data, etc. Thanks.

On Sat, Oct 24, 2015 at 7:28 PM, Adrian Klaver 
wrote:

> On 10/24/2015 07:20 PM, David Blomstrom wrote:
>
>> I'm on a Mac running OS X El Capitain. I think I installed PostgreSQL
>> 9.5 after following the links to
>> http://www.enterprisedb.com/products-services-training/pgdownload#osx
>>
>
> Well the tutorial is geared to using the command line to run programs.
>
> Are you comfortable with the command line or would you prefer to use a GUI
> like pgAdmin?
>
>
>> I just learned about phpPGAdmin and installed it as well. But when I
>> navigate to localhost/phppgadmin, I get a "not found" error message.
>>
>> On Sat, Oct 24, 2015 at 6:35 PM, Adrian Klaver
>> > wrote:
>>
>> On 10/24/2015 06:21 PM, David Blomstrom wrote:
>>
>> I just installed PostgreSQL and started reading the tutorial @
>> http://www.postgresql.org/docs/8.0/static/tutorial-createdb.html
>> and was
>> snowed at square one. To create a database, I'm supposed to type
>> the
>> following command:
>>
>> $  createdb mydb
>>
>> But it doesn't say where I'm supposed to type it. When I click
>> on the
>> PostgreSQL icon in my taskbar, a program called pgAdminIII opens
>> up.
>> I've clicked File, Edit, Plugins, etc., but I don't see any
>> clues about
>> where I'm supposed to type commands.
>>
>>
>> So lets backup up a bit:
>>
>> 1) What OS are you on?
>>
>> 2) How did you install Postgres?
>>
>> 3) What version of Postgres?
>> Hope it is not 8.0 implied by the doc link above.
>>
>>
>> --
>> Adrian Klaver
>> adrian.kla...@aklaver.com 
>>
>>
>>
>>
>> --
>> David Blomstrom
>> Writer & Web Designer (Mac, M$ & Linux)
>> www.geobop.org 
>>
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>



-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org


Re: [GENERAL] Where do I enter commands?

2015-10-24 Thread David Blomstrom
I'm a writer. I studied programing and MySQL so I could create websites
that I can publish my articles to. I don't have time to keep up with the
endless technology - MySQL, PDO, stored procedures, PHP, JavaScript,
JQuery, and on and on - especially when I have to work for a living. I've
been using MySQL for years, so I'm familiar with it. It therefore makes
sense for me to find a GUI as similar to MySQL as possible.

With phpMyAdmin, I can easily create, modify, copy and migrate tables
between databases. If that can be done as easily with a command-line-tool,
even after surviving the learning curve, then I'm interested. But it's
really hard to imagine how that could be.

Thanks for the tips.

On Sat, Oct 24, 2015 at 9:07 PM, Adrian Klaver 
wrote:

> On 10/24/2015 08:52 PM, Rob Sargent wrote:
>
>> ok. now who has the url to the pithy
>> heres-why-you-/really/-want-the-command-line.
>>
>> It distills to something about actually knowing what you’re doing.
>>
>
> Everyone has to start somewhere. The point is get someone using Postgres
> in manner they are comfortable with, then they can start exploring the
> possibilities. I personally find the command line more productive, but
> there is a learning curve.
>
>
>>
>>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>



-- 
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org


Re: [GENERAL] Where to place suggestions for documentation improvements

2015-07-14 Thread Michael Paquier
On Tue, Jul 14, 2015 at 8:17 PM, Charles Clavadetscher
clavadetsc...@swisspug.org wrote:
 I have a generic question. Where should I/we place suggestions on possible
 improvements of the documentation? Is it here or better on pgsql-docs?

pgsql-docs may be a better place than this list dedicated to general
questions, still most of the people picking up patches from -docs also
usually have a look here.
-- 
Michael


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


Re: [GENERAL] Where to place suggestions for documentation improvements

2015-07-14 Thread Charles Clavadetscher
Thank you Michael

I will post my suggestions on pgsql-docs to make sure ;-)

Bye
Charles

 -Original Message-
 From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
 ow...@postgresql.org] On Behalf Of Michael Paquier
 Sent: Dienstag, 14. Juli 2015 14:21
 To: Charles Clavadetscher
 Cc: PostgreSQL mailing lists
 Subject: Re: [GENERAL] Where to place suggestions for documentation
 improvements
 
 On Tue, Jul 14, 2015 at 8:17 PM, Charles Clavadetscher
 clavadetsc...@swisspug.org wrote:
  I have a generic question. Where should I/we place suggestions on
  possible improvements of the documentation? Is it here or better on
 pgsql-docs?
 
 pgsql-docs may be a better place than this list dedicated to general
 questions, still most of the people picking up patches from -docs also usually
 have a look here.
 --
 Michael
 
 
 --
 Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
 To make changes to your subscription:
 http://www.postgresql.org/mailpref/pgsql-general



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


Re: [GENERAL] Where does vacuum FULL write temp-files?

2015-04-16 Thread Andreas Joseph Krogh
På fredag 17. april 2015 kl. 00:05:47, skrev Guillaume Lelarge 
guilla...@lelarge.info mailto:guilla...@lelarge.info: 2015-04-15 10:46 
GMT+02:00 Andreas Joseph Kroghandr...@visena.com mailto:andr...@visena.com: 
På onsdag 15. april 2015 kl. 04:34:31, skrev Venkata Balaji N nag1...@gmail.com
 mailto:nag1...@gmail.com:   I'm planning to vacuum FULL a pg_largeobject 
relation (after vacuumlo'ing it). The relation is 300GB large so I'm concerned 
the operation will write full my pg_xlog directory which is on a 200GB (net) 
RAID1 SSD.   Where does vacuum FULL rewrite to, does it use pg_xlog or some 
other directory?   Which version of PostgreSQL is this ?
   If i got your question correctly, VACUUM FULL would rewrite the data to a 
new data file associated with that particular relation (Table) in the 
$PGDATA/base directory. This needs an extra disk space at the OS level (this 
is not related to pg_xlog directory).

 As VACUUMING is a data change operation, pg_xlog will also have only the 
WAL data (modifications) written at the time of VACUUMING.

http://www.postgresql.org/docs/9.4/static/sql-vacuum.html 
http://www.postgresql.org/docs/9.4/static/sql-vacuum.html   This is PG-9.3   
So I understand that VACUUM FULL writes the new table to the same tablespace as 
the original table (also for system-catalogs like pg_largeobject), and doesn't 
use any temp-space outside the location of that tablespace?     You're right.   
Thanks.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 
963 andr...@visena.com mailto:andr...@visena.com www.visena.com 
https://www.visena.com  https://www.visena.com  

Re: [GENERAL] Where does vacuum FULL write temp-files?

2015-04-16 Thread Guillaume Lelarge
2015-04-15 10:46 GMT+02:00 Andreas Joseph Krogh andr...@visena.com:

 På onsdag 15. april 2015 kl. 04:34:31, skrev Venkata Balaji N 
 nag1...@gmail.com:



 I'm planning to vacuum FULL a pg_largeobject relation (after vacuumlo'ing
 it). The relation is 300GB large so I'm concerned the operation will write
 full my pg_xlog directory which is on a 200GB (net) RAID1 SSD.

 Where does vacuum FULL rewrite to, does it use pg_xlog or some other
 directory?


 Which version of PostgreSQL is this ?

 If i got your question correctly, VACUUM FULL would rewrite the data to a
 new data file associated with that particular relation (Table) in the
 $PGDATA/base directory. This needs an extra disk space at the OS level
 (this is not related to pg_xlog directory).

 As VACUUMING is a data change operation, pg_xlog will also have only the
 WAL data (modifications) written at the time of VACUUMING.

 http://www.postgresql.org/docs/9.4/static/sql-vacuum.html


 This is PG-9.3

 So I understand that VACUUM FULL writes the new table to the same
 tablespace as the original table (also for system-catalogs like
 pg_largeobject), and doesn't use any temp-space outside the location of
 that tablespace?


You're right.


-- 
Guillaume.
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


Re: [GENERAL] Where does vacuum FULL write temp-files?

2015-04-15 Thread Andreas Joseph Krogh
På onsdag 15. april 2015 kl. 04:34:31, skrev Venkata Balaji N nag1...@gmail.com
 mailto:nag1...@gmail.com:   I'm planning to vacuum FULL a pg_largeobject 
relation (after vacuumlo'ing it). The relation is 300GB large so I'm concerned 
the operation will write full my pg_xlog directory which is on a 200GB (net) 
RAID1 SSD.   Where does vacuum FULL rewrite to, does it use pg_xlog or some 
other directory?   Which version of PostgreSQL is this ?
   If i got your question correctly, VACUUM FULL would rewrite the data to a 
new data file associated with that particular relation (Table) in the 
$PGDATA/base directory. This needs an extra disk space at the OS level (this 
is not related to pg_xlog directory).

 As VACUUMING is a data change operation, pg_xlog will also have only the 
WAL data (modifications) written at the time of VACUUMING.

http://www.postgresql.org/docs/9.4/static/sql-vacuum.html 
http://www.postgresql.org/docs/9.4/static/sql-vacuum.html   This is PG-9.3   
So I understand that VACUUM FULL writes the new table to the same tablespace as 
the original table (also for system-catalogs like pg_largeobject), and doesn't 
use any temp-space outside the location of that tablespace?   Thanks.   -- 
Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 
andr...@visena.com mailto:andr...@visena.com www.visena.com 
https://www.visena.com  https://www.visena.com  

Re: [GENERAL] Where does vacuum FULL write temp-files?

2015-04-14 Thread Venkata Balaji N
 I'm planning to vacuum FULL a pg_largeobject relation (after vacuumlo'ing
 it). The relation is 300GB large so I'm concerned the operation will write
 full my pg_xlog directory which is on a 200GB (net) RAID1 SSD.

 Where does vacuum FULL rewrite to, does it use pg_xlog or some other
 directory?


Which version of PostgreSQL is this ?

If i got your question correctly, VACUUM FULL would rewrite the data to a
new data file associated with that particular relation (Table) in the
$PGDATA/base directory. This needs an extra disk space at the OS level
(this is not related to pg_xlog directory).

As VACUUMING is a data change operation, pg_xlog will also have only the
WAL data (modifications) written at the time of VACUUMING.

http://www.postgresql.org/docs/9.4/static/sql-vacuum.html

Regards,
Venkata Balaji N

Fujitsu Australia


Re: [GENERAL] Where should I post 3rd party product announcements?

2014-10-14 Thread Amit Langote
On Tue, Oct 14, 2014 at 4:58 PM, Jonathan Neve jonat...@copycat.fr wrote:
 Hello,

 I am the author of a database replication solution to which I recently added
 Postgres support. I would like to let the PG community know about it and I
 therefore posted a message to this list, but it didn't come through,
 presumably because it was considered to be spam.

 Where would be a more appropriate place to make such an announcement?


Take a look at this page:

http://www.postgresql.org/list/

pgsql-announce is the list you are looking for.

--
Amit


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


Re: [GENERAL] Where should I post 3rd party product announcements?

2014-10-14 Thread Jonathan Neve

Hello Amit,

I tried pg-announce as well, but my message didn't go through…

Jonathan

Le mardi 14 octobre 2014 11:38:02, Amit Langote a écrit :

On Tue, Oct 14, 2014 at 4:58 PM, Jonathan Neve jonat...@copycat.fr wrote:

Hello,

I am the author of a database replication solution to which I recently added
Postgres support. I would like to let the PG community know about it and I
therefore posted a message to this list, but it didn't come through,
presumably because it was considered to be spam.

Where would be a more appropriate place to make such an announcement?



Take a look at this page:

http://www.postgresql.org/list/

pgsql-announce is the list you are looking for.

--
Amit





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


Re: [GENERAL] Where should I post 3rd party product announcements?

2014-10-14 Thread Atri Sharma
On Tue, Oct 14, 2014 at 3:12 PM, Jonathan Neve jonat...@copycat.fr wrote:

 Hello Amit,

 I tried pg-announce as well, but my message didn't go through…

 Jonathan

 Le mardi 14 octobre 2014 11:38:02, Amit Langote a écrit :

  On Tue, Oct 14, 2014 at 4:58 PM, Jonathan Neve jonat...@copycat.fr
 wrote:

 Hello,

 I am the author of a database replication solution to which I recently
 added
 Postgres support. I would like to let the PG community know about it and
 I
 therefore posted a message to this list, but it didn't come through,
 presumably because it was considered to be spam.

 Where would be a more appropriate place to make such an announcement?


 Take a look at this page:

 http://www.postgresql.org/list/

 pgsql-announce is the list you are looking for.



Did you subscribe to the lists?


Re: [GENERAL] Where should I post 3rd party product announcements?

2014-10-14 Thread Magnus Hagander
On Tue, Oct 14, 2014 at 11:42 AM, Jonathan Neve jonat...@copycat.fr wrote:
 Hello Amit,

 I tried pg-announce as well, but my message didn't go through…

Not having seen the actual post, it may have been moderated based on
the rules at https://wiki.postgresql.org/wiki/NewsEventsApproval.
These are primarily for website news postings - but a website news
postign is really what you should do with it, rather than post it to a
mailinglist. So I suggest a look at those rules and then a website
news submission that follows them.


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


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


Re: [GENERAL] Where should I post 3rd party product announcements?

2014-10-14 Thread Jonathan Neve
Sorry for being a bit dense, but where should I submit a website news 
posting ?


Le mardi 14 octobre 2014 11:45:55, Magnus Hagander a écrit :

On Tue, Oct 14, 2014 at 11:42 AM, Jonathan Neve jonat...@copycat.fr wrote:

Hello Amit,

I tried pg-announce as well, but my message didn't go through…


Not having seen the actual post, it may have been moderated based on
the rules at https://wiki.postgresql.org/wiki/NewsEventsApproval.
These are primarily for website news postings - but a website news
postign is really what you should do with it, rather than post it to a
mailinglist. So I suggest a look at those rules and then a website
news submission that follows them.







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


Re: [GENERAL] Where should I post 3rd party product announcements?

2014-10-14 Thread Magnus Hagander
It's on http://www.postgresql.org/, click the link that says Submit news.

//Magnus

On Tue, Oct 14, 2014 at 11:55 AM, Jonathan Neve jonat...@copycat.fr wrote:
 Sorry for being a bit dense, but where should I submit a website news
 posting ?

 Le mardi 14 octobre 2014 11:45:55, Magnus Hagander a écrit :

 On Tue, Oct 14, 2014 at 11:42 AM, Jonathan Neve jonat...@copycat.fr
 wrote:

 Hello Amit,

 I tried pg-announce as well, but my message didn't go through…


 Not having seen the actual post, it may have been moderated based on
 the rules at https://wiki.postgresql.org/wiki/NewsEventsApproval.
 These are primarily for website news postings - but a website news
 postign is really what you should do with it, rather than post it to a
 mailinglist. So I suggest a look at those rules and then a website
 news submission that follows them.






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



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


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


Re: [GENERAL] Where should I post 3rd party product announcements?

2014-10-14 Thread Jonathan Neve

Thanks, I'll give that a try!

Jonathan

Le 14/10/14 12:01, Magnus Hagander a écrit :

It's on http://www.postgresql.org/, click the link that says Submit news.

//Magnus

On Tue, Oct 14, 2014 at 11:55 AM, Jonathan Neve jonat...@copycat.fr wrote:

Sorry for being a bit dense, but where should I submit a website news
posting ?

Le mardi 14 octobre 2014 11:45:55, Magnus Hagander a écrit :

On Tue, Oct 14, 2014 at 11:42 AM, Jonathan Neve jonat...@copycat.fr
wrote:

Hello Amit,

I tried pg-announce as well, but my message didn't go through…


Not having seen the actual post, it may have been moderated based on
the rules at https://wiki.postgresql.org/wiki/NewsEventsApproval.
These are primarily for website news postings - but a website news
postign is really what you should do with it, rather than post it to a
mailinglist. So I suggest a look at those rules and then a website
news submission that follows them.






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







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


Re: [GENERAL] Where should I post 3rd party product announcements?

2014-10-14 Thread Alvaro Herrera
 On Tue, Oct 14, 2014 at 3:12 PM, Jonathan Neve jonat...@copycat.fr wrote:
 
  I tried pg-announce as well, but my message didn't go through…

The message is not in the moderation queue, so it must have been flagged
as spam.  Without having seen it, a priori I don't think it's completely
inappropriate for pgsql-announce, though.

-- 
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training  Services


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


Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Seref Arikan
I've gone through the same journey myself. Tried to juggle dlls etc.
Apparently python 2 is no longer included in the windows installer.
Since I have lots of python 2.x code with native extensions etc, I thought
about compiling postgres from source on Windows but as usual the process
turned into a nightmare (compiling anything on Windows is, at least for me)
There is also the problem of postgres distribution on windows using the
activestate version of python distribution instead of the python.org one if
my memory is not failing me.

Anyway, I ended up using virtualbox with linux guest because of this issue.
If there is an easy way to get python 2.x(7?) working with postgres on
windows, it would be nice to hear.



On Tue, Sep 23, 2014 at 9:36 AM, Craig Ringer cr...@2ndquadrant.com wrote:

 Hi all

 I've had some issues with how the procedural languages are packaged in
 the Windows installer for a while, but I was very surprised to see that
 plpython2 appears to be entirely absent in 9.3.

 It doesn't seem to be provided via EDB's StackBuilder app either.

 What's going on? It looks like it was dropped in 9.1.

 PL/Python 2 and PL/Python 3 are different things. You can't just upgrade
 trivially from plpython2 to plpython3.

 Python 2 and Python 3 install side-by-side without issues.

 Why isn't plpython2.dll built and included?

 It's good to see that the required procedural language runtime versions
 are now included in installation-notes.html in the installer, though.
 Thanks for that.

 (Any thoughts on my prior question about using virtual service accounts
 on Windows 7, btw?)

 --
  Craig Ringer   http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training  Services


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



Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Daniel Lenski
Craig Ringer craig at 2ndquadrant.com writes:

 I've had some issues with how the procedural languages are packaged in
 the Windows installer for a while, but I was very surprised to see that
 plpython2 appears to be entirely absent in 9.3.

 It doesn't seem to be provided via EDB's StackBuilder app either.

 What's going on? It looks like it was dropped in 9.1.

 PL/Python 2 and PL/Python 3 are different things. You can't just upgrade
 trivially from plpython2 to plpython3.

 Python 2 and Python 3 install side-by-side without issues.

 Why isn't plpython2.dll built and included?

 It's good to see that the required procedural language runtime versions
 are now included in installation-notes.html in the installer, though.
 Thanks for that.

The absence of plpython2 support in Windows builds of 9.3 led to quite a
bit of confusion for me especially because the docs seem to make it quite
clear that PL/Python 2 is intended to be the default version in standard
builds of PostgreSQL both now and for the foreseeable future:
http://www.postgresql.org/docs/9.3/static/plpython-python23.html

(By the way, Craig Ringer and I came across this in a discussion on
StackOverflow where we both confirmed that plpython2.dll is absent from the
stock installer for PG 9.3. A number of other threads suggest that we're
not the only ones who've been stumped by this omission.
http://stackoverflow.com/questions/24216627/how-to-install-pl-python-on-postgresql-9-3-x64-windows-7/24218449?noredirect=1#comment40700651_24218449
)

Thanks,
Dan Lenski


Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Nick Guenther



Quoting Seref Arikan serefari...@gmail.com:


On Tue, Sep 23, 2014 at 9:36 AM, Craig Ringer cr...@2ndquadrant.com wrote:


Hi all

I've had some issues with how the procedural languages are packaged in
the Windows installer for a while, but I was very surprised to see that
plpython2 appears to be entirely absent in 9.3.

It doesn't seem to be provided via EDB's StackBuilder app either.

What's going on? It looks like it was dropped in 9.1.



I've gone through the same journey myself. Tried to juggle dlls etc.[...]




I've struggled with plpython on OpenBSD 5.5-amd64 as well. Could it be  
related? Maybe the amount of dependencies python pulls in gets  
overwhelming and things break?



$ psql -h localhost -d postgres
psql (9.3.2)
Type help for help.
postgres=# create language plpython2u;
ERROR:  could not load library  
/usr/local/lib/postgresql/plpython2.so: dlopen  
(/usr/local/lib/postgresql/plpython2.so) failed: Cannot load specified  
object

postgres=# create language plperl;
CREATE LANGUAGE
postgres=#


This is strange because /usr/local/lib/postgresql/plpython2.so exists.  
Also, perl loads fine.

$ ls -l /usr/local/lib/postgresql/pl*
-rwxr-xr-x  1 root  bin  100948 Jul 31 02:05  
/usr/local/lib/postgresql/plperl.so
-rwxr-xr-x  1 root  bin  181287 Jul 31 02:05  
/usr/local/lib/postgresql/plpgsql.so
-rwxr-xr-x  1 root  bin  137951 Mar  4 12:45  
/usr/local/lib/postgresql/plpython2.so



I uninstalled all the postgres subpackages and rebuilt them from  
ports, and ended up with an identical plpython2.so, which has these  
checksums:
SHA256 (/usr/local/lib/postgresql/plpython2.so) =  
8c7ff6358d9bf0db342e3aca1762cd7c509075a6803b240291d60a21ca38198b
MD5 (/usr/local/lib/postgresql/plpython2.so) =  
bb6122f27f48f0b3672dbc79cef40eea
SHA1 (/usr/local/lib/postgresql/plpython2.so) =  
4dd79641cbad3f71466648559d74e6b0c4f174a3


Any other OpenBSD users that have run into this, here?

--
Nick Guenther
4B Stats/CS
University of Waterloo






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


Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Alan Hodgson
On Tuesday, September 23, 2014 02:05:48 PM Nick Guenther wrote:
 I uninstalled all the postgres subpackages and rebuilt them from
 ports, and ended up with an identical plpython2.so, which has these
 checksums:
 SHA256 (/usr/local/lib/postgresql/plpython2.so) =
 8c7ff6358d9bf0db342e3aca1762cd7c509075a6803b240291d60a21ca38198b
 MD5 (/usr/local/lib/postgresql/plpython2.so) =
 bb6122f27f48f0b3672dbc79cef40eea
 SHA1 (/usr/local/lib/postgresql/plpython2.so) =
 4dd79641cbad3f71466648559d74e6b0c4f174a3
 
 Any other OpenBSD users that have run into this, here?

I'm not a current BSD user, but I'd suggest ldd'ing that library and see if it 
has any shared libraries it can't find or if it references shared libraries 
that are not in whatever OpenBSD uses for a library search path (ie. the 
equivalent of Linux's ld.so.conf), or if any of those shared libraries have 
permissions issues.



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


Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Adrian Klaver

On 09/23/2014 11:05 AM, Nick Guenther wrote:



Quoting Seref Arikan serefari...@gmail.com:


On Tue, Sep 23, 2014 at 9:36 AM, Craig Ringer cr...@2ndquadrant.com
wrote:


Hi all

I've had some issues with how the procedural languages are packaged in
the Windows installer for a while, but I was very surprised to see that
plpython2 appears to be entirely absent in 9.3.

It doesn't seem to be provided via EDB's StackBuilder app either.

What's going on? It looks like it was dropped in 9.1.



I've gone through the same journey myself. Tried to juggle dlls etc.[...]




I've struggled with plpython on OpenBSD 5.5-amd64 as well. Could it be
related? Maybe the amount of dependencies python pulls in gets
overwhelming and things break?


$ psql -h localhost -d postgres
psql (9.3.2)
Type help for help.
postgres=# create language plpython2u;
ERROR:  could not load library /usr/local/lib/postgresql/plpython2.so:
dlopen (/usr/local/lib/postgresql/plpython2.so) failed: Cannot load
specified object
postgres=# create language plperl;
CREATE LANGUAGE
postgres=#




What user are you running as?

plpythonu is an untrusted language so it can only be installed by a 
superuser.
Also languages are now extensions and should be installed using CREATE 
EXTENSION:


http://www.postgresql.org/docs/9.3/interactive/sql-createlanguage.html




Any other OpenBSD users that have run into this, here?




--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Daniel Lenski
On Tue, Sep 23, 2014 at 11:05 AM, Nick Guenther nguen...@uwaterloo.ca
wrote:
 I've struggled with plpython on OpenBSD 5.5-amd64 as well. Could it be
related? Maybe the amount of dependencies python pulls in gets overwhelming
and things break?


 $ psql -h localhost -d postgres
 psql (9.3.2)
 Type help for help.
 postgres=# create language plpython2u;
 ERROR:  could not load library /usr/local/lib/postgresql/plpython2.so:
dlopen (/usr/local/lib/postgresql/plpython2.so) failed: Cannot load
specified object
 postgres=# create language plperl;
 CREATE LANGUAGE
 postgres=#


 This is strange because /usr/local/lib/postgresql/plpython2.so exists.
Also, perl loads fine.
 $ ls -l /usr/local/lib/postgresql/pl*
 -rwxr-xr-x  1 root  bin  100948 Jul 31 02:05
/usr/local/lib/postgresql/plperl.so
 -rwxr-xr-x  1 root  bin  181287 Jul 31 02:05
/usr/local/lib/postgresql/plpgsql.so
 -rwxr-xr-x  1 root  bin  137951 Mar  4 12:45
/usr/local/lib/postgresql/plpython2.so


Hmmm... I doubt that this is directly related to the Windows issue, where
the shared library simply doesn't exist in the standard installation.

Can anyone confirm whether the plpython2 omission from the Windows builds
was intentional? If it is intentional, then a few simple changes would make
it easier for users like me to figure out that it's missing, not just
misconfigured:
* Make plpythonu point to plpython3u, rather than plpython2u, by default
* Omit plpython2u from the pg_pltemplate catalog, so that this:
  CREATE LANGUAGE plpython2u
  ... would give a more helpful error message:
  ERROR:  unsupported language plpython2u

-Dan


Fwd: Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Nick Guenther



On September 23, 2014 2:27:29 PM EDT, Adrian Klaver  
adrian.kla...@aklaver.com wrote:

On 09/23/2014 11:05 AM, Nick Guenther wrote:



Quoting Seref Arikan serefari...@gmail.com:


On Tue, Sep 23, 2014 at 9:36 AM, Craig Ringer

cr...@2ndquadrant.com

wrote:


Hi all

I've had some issues with how the procedural languages are packaged

in

the Windows installer for a while, but I was very surprised to see

that

plpython2 appears to be entirely absent in 9.3.

It doesn't seem to be provided via EDB's StackBuilder app either.

What's going on? It looks like it was dropped in 9.1.



I've gone through the same journey myself. Tried to juggle dlls

etc.[...]





I've struggled with plpython on OpenBSD 5.5-amd64 as well. Could it

be

related? Maybe the amount of dependencies python pulls in gets
overwhelming and things break?


$ psql -h localhost -d postgres
psql (9.3.2)
Type help for help.

  postgres=# create language plpython2u;

ERROR:  could not load library

/usr/local/lib/postgresql/plpython2.so:

dlopen (/usr/local/lib/postgresql/plpython2.so) failed: Cannot load
specified object
postgres=# create language plperl;
CREATE LANGUAGE
postgres=#




What user are you running as?
plpythonu is an untrusted language so it can only be installed by a
superuser.


My user account which is also the one that ran initdb and the one that  
ran postgres. I discovered this when trying to work on a project I'd  
started on arch linux where everything is peachy.



Also languages are now extensions and should be installed using CREATE
EXTENSION:

http://www.postgresql.org/docs/9.3/interactive/sql-createlanguage.html


Ah, thanks for the tip. I will change over to that. But CREATE  
EXTENSION gives the identical error:


postgres=# create extension plpython2u;
ERROR:  could not load library  
/usr/local/lib/postgresql/plpython2.so: dlopen  
(/usr/local/lib/postgresql/plpython2.so) failed: Cannot load specified  
object


 On September 23, 2014 2:25:43 PM EDT, Alan Hodgson  
ahodg...@simkin.ca wrote:


I'm not a current BSD user, but I'd suggest ldd'ing that library and
see if it
has any shared libraries it can't find or if it references shared
libraries
that are not in whatever OpenBSD uses for a library search path (ie.
the
equivalent of Linux's ld.so.conf), or if any of those shared libraries
have
permissions issues.


Ah, good point.

It turned out that the problem DLL was libpthread. I discovered this  
using LD_DEBUG and worked around it with LD_PRELOAD.



Full output is below, so that hopefully this becomes searchable:

$ uname -a
OpenBSD localhost.localdomain 5.5 GENERIC.MP#315 amd64

$ initdb data
The files belonging to this database system will be owned by user nguenthe.
This user must also own the server process.

The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to english.

Data page checksums are disabled.

creating directory data ... ok
creating subdirectories ... ok
selecting default max_connections ... 40
selecting default shared_buffers ... 128MB
creating configuration files ... ok
creating template1 database in data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... not supported on this platform
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
syncing data to disk ... ok

WARNING: enabling trust authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

postgres -D data
or
pg_ctl -D data -l logfile start



$ LD_DEBUG=1 postgres -D ./data
rtld loading: 'postgres'
exe load offset:  0x1c200040
 flags postgres = 0x0
head postgres
obj postgres has postgres as head
examining: 'postgres'
loading: libasn1.so.20.0 required by postgres
 flags /usr/lib/libasn1.so.20.0 = 0x0
obj /usr/lib/libasn1.so.20.0 has postgres as head
loading: libroken.so.1.0 required by postgres
 flags /usr/lib/libroken.so.1.0 = 0x0
obj /usr/lib/libroken.so.1.0 has postgres as head
loading: libwind.so.1.0 required by postgres
 flags /usr/lib/libwind.so.1.0 = 0x0
obj /usr/lib/libwind.so.1.0 has postgres as head
loading: libc.so.73.1 required by postgres
 flags /usr/lib/libc.so.73.1 = 0x0
obj /usr/lib/libc.so.73.1 has postgres as head
loading: libkrb5.so.20.0 required by postgres
 flags /usr/lib/libkrb5.so.20.0 = 0x0
obj /usr/lib/libkrb5.so.20.0 has postgres as head
loading: libcrypto.so.23.0 required by postgres
 flags /usr/lib/libcrypto.so.23.0 = 0x0
obj 

Re: [GENERAL] Where can I download PostgreSQL 9.4 for AIX 6?

2014-08-08 Thread John R Pierce

On 8/8/2014 1:30 PM, Deb Brooks wrote:
I am not sure how to find the download file for PostgreSQL 9.4 on AIX 
6.  Would someone point me to the correct location?


AFAIK, you have to compile it yourself from source, and I'd recommend 
using IBM XL C rather than GCC.  At least, thats what I've been doing.   
Note, by the way, 9.4 is still in beta test.







--
john r pierce  37N 122W
somewhere on the middle of the left coast



Re: [GENERAL] Where can I download PostgreSQL 9.4 for AIX 6?

2014-08-08 Thread Deb Brooks
Thank you for the prompt reply and the advice.


This email and any files transmitted with it are confidential, proprietary and 
intended solely for the individual or entity to whom they are addressed. If you 
have received this email in error please delete it immediately.


Re: [GENERAL] Where can I download PostgreSQL 9.4 for AIX 6?

2014-08-08 Thread Adrian Klaver

On 08/08/2014 01:45 PM, Deb Brooks wrote:

Thank you for the prompt reply and the advice.



If you are going to compile from source the following might come in handy:

http://www.postgresql.org/docs/9.4/static/installation-platform-notes.html#INSTALLATION-NOTES-AIX



--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] Where the core files are generated in running postgres server

2014-08-04 Thread Asif Naeem
Hi Tarkeshwar,

If you are using Unix/Linux following link might be useful to you i.e.

https://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD#Enabling_core_dumps

Regards,
Muhammad Asif Naeem

On Mon, Aug 4, 2014 at 3:19 PM, M Tarkeshwar Rao 
m.tarkeshwar@ericsson.com wrote:

 Hi all,

 I want to know the exact path of the core files generated by Postgres
 server during crash?

 Can I configure it or generate it?

 Regards
 Tarkeshwar

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



Re: [GENERAL] Where the core files are generated in running postgres server

2014-08-04 Thread M Tarkeshwar Rao
Hi Asif,

Is it always creating core files on /var/lib/postgresql/8.4/main path for 
ubontu?
i.e. in data directory.

Regards
Tarkeshwar

From: Asif Naeem [mailto:anaeem...@gmail.com]
Sent: 04 August 2014 16:01
To: M Tarkeshwar Rao
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Where the core files are generated in running postgres 
server

Hi Tarkeshwar,

If you are using Unix/Linux following link might be useful to you i.e.

https://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD#Enabling_core_dumps

Regards,
Muhammad Asif Naeem
On Mon, Aug 4, 2014 at 3:19 PM, M Tarkeshwar Rao 
m.tarkeshwar@ericsson.commailto:m.tarkeshwar@ericsson.com wrote:
Hi all,

I want to know the exact path of the core files generated by Postgres server 
during crash?

Can I configure it or generate it?

Regards
Tarkeshwar

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



Re: [GENERAL] Where the core files are generated in running postgres server

2014-08-04 Thread Michael Paquier
On Mon, Aug 4, 2014 at 7:56 PM, M Tarkeshwar Rao
m.tarkeshwar@ericsson.com wrote:
 Is it always creating core files on /var/lib/postgresql/8.4/main path for
 ubuntu?
I don't recall for ubuntu, but on Linux for sure you can see how a
core file is shaped by looking at /proc/sys/kernel/core_pattern. Just
noticing something... You should consider an upgrade to a newer
version. 8.4 has just become EOL.
Regards,
--
Michael


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


Re: [GENERAL] Where can I find the 9.3 beta1 rpm now ?

2013-11-08 Thread Adrian Klaver

On 11/06/2013 12:56 AM, Massimo Ortensi wrote:

Hi everybody. I downloaded and tested 9.3 beta 1 back in june and used
for a while.
Today I upgraded to 9.3.1 but just discovered that database cannot be
directly used, so I need to switch back to the beta version in order to
dump the data.
Is there any site I can download the old beta rpm's ?


A couple of suggestions.

1) Contact the maintainers directly:

http://yum.postgresql.org/contact.php

2) Clone  9.3beta1 from the git repo and build from source:

http://git.postgresql.org/gitweb/?p=postgresql.git


Thanks in advance







--
Adrian Klaver
adrian.kla...@gmail.com


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


Re: [GENERAL] WHERE 'Something%' LIKE ANY (array_field)

2013-08-14 Thread Pavel Stehule
Hello

http://postgres.cz/wiki/PostgreSQL_SQL_Tricks#LIKE_to_list_of_patterns

Regards

Pavel Stehule


2013/8/14 Tim Kane tim.k...@gmail.com

 Hi all,

 It seems like it isn't possible to perform a wildcard LIKE evaluation
 against array objects. Is this a bug, or just unsupported?


 See the queries in bold, that I would have expected to return a value.
 Postgres 9.1.9


 =# create temp table ids (id varchar(12)[]);
 CREATE TABLE
 Time: 185.516 ms
 =# insert into ids values ('{s1,s452334,s89}');
 INSERT 0 1
 Time: 0.728 ms
 =# insert into ids values ('{s89}');
 INSERT 0 1
 Time: 0.300 ms
 =# insert into ids values ('{s9323,s893}');
 INSERT 0 1
 Time: 0.133 ms
 =# insert into ids values ('{s9323,s893,s89}');
 INSERT 0 1
 Time: 0.110 ms
 =# select * from ids;
 id
 --
  {s1,s452334,s89}
  {s89}
  {s9323,s893}
  {s9323,s893,s89}
 (4 rows)

 Time: 0.155 ms
 =# select * from ids where 's89' = ANY (id);
 id
 --
  {s1,s452334,s89}
  {s89}
  {s9323,s893,s89}
 (3 rows)

 Time: 0.121 ms
 *clone=# select * from ids where 's45%' LIKE ANY (id);*
  id
 
 (0 rows)

 Time: 0.124 ms

 *clone=# select * from ids where 's452334%' LIKE ANY (id);*
  id
 
 (0 rows)

 Time: 0.278 ms
 clone=# select * from ids where 's452334' LIKE ANY (id);
 id
 --
  {s1,s452334,s89}
 (1 row)

 Time: 0.134 ms
 clone=# select * from ids where 's452334' = ANY (id);
 id
 --
  {s1,s452334,s89}
 (1 row)



Re: [GENERAL] WHERE 'Something%' LIKE ANY (array_field)

2013-08-14 Thread Tim Kane
Thanks Pavel,

Unless I'm being bleary eyed and not quite grasping it...  I'm not sure
that answers my question.
I'm using a single LIKE clause against an array parameter, rather than
multiple LIKE clauses against a single parameter.


It seems I'm so far stuck with a FOREACH style traversal within plpgsql
(which is fine, as this is all to be used within a function anyway).




On Wed, Aug 14, 2013 at 10:55 AM, Pavel Stehule pavel.steh...@gmail.comwrote:

 Hello

 http://postgres.cz/wiki/PostgreSQL_SQL_Tricks#LIKE_to_list_of_patterns

 Regards

 Pavel Stehule


 2013/8/14 Tim Kane tim.k...@gmail.com

 Hi all,

 It seems like it isn't possible to perform a wildcard LIKE evaluation
 against array objects. Is this a bug, or just unsupported?


 See the queries in bold, that I would have expected to return a value.
 Postgres 9.1.9


 =# create temp table ids (id varchar(12)[]);
 CREATE TABLE
 Time: 185.516 ms
 =# insert into ids values ('{s1,s452334,s89}');
 INSERT 0 1
 Time: 0.728 ms
 =# insert into ids values ('{s89}');
 INSERT 0 1
 Time: 0.300 ms
 =# insert into ids values ('{s9323,s893}');
 INSERT 0 1
 Time: 0.133 ms
 =# insert into ids values ('{s9323,s893,s89}');
 INSERT 0 1
 Time: 0.110 ms
 =# select * from ids;
 id
 --
  {s1,s452334,s89}
  {s89}
  {s9323,s893}
  {s9323,s893,s89}
 (4 rows)

 Time: 0.155 ms
 =# select * from ids where 's89' = ANY (id);
 id
 --
  {s1,s452334,s89}
  {s89}
  {s9323,s893,s89}
 (3 rows)

 Time: 0.121 ms
 *clone=# select * from ids where 's45%' LIKE ANY (id);*
  id
 
 (0 rows)

 Time: 0.124 ms

 *clone=# select * from ids where 's452334%' LIKE ANY (id);*
  id
 
 (0 rows)

 Time: 0.278 ms
 clone=# select * from ids where 's452334' LIKE ANY (id);
 id
 --
  {s1,s452334,s89}
 (1 row)

 Time: 0.134 ms
 clone=# select * from ids where 's452334' = ANY (id);
 id
 --
  {s1,s452334,s89}
 (1 row)





Re: [GENERAL] WHERE 'Something%' LIKE ANY (array_field)

2013-08-14 Thread Kevin Grittner
Tim Kane tim.k...@gmail.com wrote:

 I'm using a single LIKE clause against an array parameter, rather
 than multiple LIKE clauses against a single parameter.

The problem is that you have the arguments to the LIKE parameter
reversed with the attempts you show.  Try something like this:

select * from ids
  where exists
   (select * from (select unnest(ids.id)) x(id)
 where x.id like 's45%');

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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


Re: [GENERAL] Where to set search_path

2013-04-26 Thread David Johnston
Jeff Janes wrote
 I've have an application which uses the public schema for all of its
 relations.
 
 I want to change the name of the schema (in preparation to merging the
 database into that of another application, which also uses the public
 schema for its tables).
 
 I could qualify all of the tables and sequence with the schema names in
 the
 source code SQL, but that is a lot of tedious work and I don't think it
 even counts as an improvement.  I think I'd rather use search_path in the
 application being migrated, and only use fully qualified names for the
 (small) part of the code that will explicitly need to bridge both systems.
 
 Once I rename the schema (alter schema public rename to new_schema;) I
 can set the search path either on the db side, or on the app side.  That
 is, by alter role web_user set search_path TO new_schema, or by changing
 the centralized subroutine used by the application to get a database
 handle, something like this:
 
 sub getdbh {
   require DBI;
   my $dbh = DBI-connect(..., {AutoCommit=1, RaiseError=1,
 PrintError=0});
   $dbh-do(set search_path to new_schema);
   return $dbh;
 };
 
 Is there a reason to choose one of these options over the other?  Or is it
 purely a matter of taste?
 
 I'm leaning towards the latter method, because it seems the future
 application maintainer is more likely to benefit from the clue about the
 search_path than the future DBA (assuming those roles get split).
 
 Thanks,
 
 Jeff

I don't really have any support for my thinking but I'd much rather put this
kind of setup on the database user and not the application.  At worse you
MAY want to validate what the current search_path is at the client level. 
My thinking would be along the lines of most users should not care what
schemas they are using and so should be also to simply logon and have things
work.  The users who do care about bridging between the two worlds should
have the search_path default to something invalid and in doing so force
those users to be explicit regarding which schemas they intend to work with.

My $0.02

David J




--
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Where-to-set-search-path-tp5753452p5753462.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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


Re: [GENERAL] Where in the source code does postgres write to disk?

2013-04-22 Thread Merlin Moncure
On Fri, Apr 19, 2013 at 11:26 PM, Mike Levine michael.lev...@yale.edu wrote:
 According to
 http://www.postgresql.org/docs/9.2/static/storage-file-layout.html

 When a table or index exceeds 1 GB, it is divided into gigabyte-sized
 segments. The first segment's file name is the same as the filenode;
 subsequent segments are named filenode.1, filenode.2, etc.

 I was wondering where in the source code this is dealt with. I have been
 searching for the last few hours but have had no luck


 Any help guiding me to the location in the source code where postgres writes
 the buffer to disk would be greatly appreciated.

postgres disk writing mostly happens in md.c.  reason why you probably
had trouble finding it is that disk i/o (as with memory allocation) is
hidden behind a function pointer interface.

merlin


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


Re: [GENERAL] Where in the source code does postgres write to disk?

2013-04-20 Thread Satoshi Nagayasu

Hi,

2013/04/21 0:01, Mike Levine wrote:

According
tohttp://www.postgresql.org/docs/9.2/static/storage-file-layout.html

When a table or index exceeds 1 GB, it is divided into gigabyte-sized
segments. The first segment's file name is the same as the filenode;
subsequent segments are named filenode.1, filenode.2, etc.

I was wondering where in the source code this is dealt with. I have been
searching for the last few hours but have had no luck


Any help guiding me to the location in the source code where postgres
writes the buffer to disk would be greatly appreciated.


See mdextend() in src/backend/storage/smgr/md.c.

That's the code which deals with segment files on extending a table,
and RELSEG_SIZE defines the segment size, 1GB by default.

Regards,
--
Satoshi Nagayasu sn...@uptime.jp
Uptime Technologies, LLC. http://www.uptime.jp


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


Re: [GENERAL] Where Can I Find...

2013-01-26 Thread John R Pierce

On 1/25/2013 8:21 AM, Gene Poole wrote:
lso I don't want to use RPM because I like to control where software 
is installed. Another piece on information is that I am running on 
CentOS 5.8. 



if you don't want to use RPM, why did you choose an RPM based distribution?



is '6 single sided DVDs' a cute way of saying around 24 GB of data?

there's absolutely NO reason to use a bunch of tablespaces for a 
database that small.  we use tablespaces for multi-terabyte databases.   
  Instead, on modern hardware, just put a bunch of small/fast disks in 
a raid10 and use that for the whole thing.


An Oracle 'instance is roughly equivalent to a postgres 'database', the 
instance can have many schemas within it.


For copying the data across, I'd look into ETL packages, such as 
http://www.jaspersoft.com/JasperSoft_JasperETL.html


these can connect to different database engines, and 'extract, 
transform, and load', with a lot of flexibilty.




--
john r pierce  37N 122W
somewhere on the middle of the left coast



Re: [GENERAL] Where Can I Find...

2013-01-25 Thread Steve Atkins

On Jan 25, 2013, at 8:21 AM, Gene Poole gene.po...@macys.com wrote:

 I'm looking for a detailed tutorial on how to move a Oracle 11gR2 database 
 that consists on 4 instances with table spaces spread across multiple file 
 systems to PostgreSQL.  I need to do this because most of the open source CMS 
 packages do not play with Oracle.  The amount of data stored in the four 
 instances (or schemas) would fit on 6 single layer DVDs, so it's not a large 
 amount of data.

I doubt you'll find one. http://wiki.postgresql.org/wiki/Oracle probably has 
something useful, and http://ora2pg.darold.net

Given it's not a desperately huge database your best bet might just be to build 
a scratch system or VM (if a dump is less than 30gigs it's the sort of size you 
can handle on your laptop) and just do it. Convert the schema manually and 
import the exported data, or use ora2pg to automate some of it, then ask 
questions when you hit specific problems.

If you're using stored procedures things get more interesting, and they'll need 
to be rewritten. Once you've got the data ported you'll likely need to rewrite 
some of the queries your apps use, as oracle has some differences.

If you have budget, you might want to take a look at 
http://www.enterprisedb.com.

 Also I don't want to use RPM because I like to control where software is 
 installed. Another piece on information is that I am running on CentOS 5.8. 

Avoiding RPMs is probably not a good operational choice, BTW.

Cheers,
  Steve

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


Re: [GENERAL] Where is 'createdb'?

2012-11-02 Thread Vincent Veyron
Le jeudi 01 novembre 2012 à 16:49 -0500, Kevin Burton a écrit :
 I watched while the OS was installed and it looked like postgres was
 installed but the Ubuntu package apparently didn’t install it all or
 it didn’t install it correctly. 
 


to list the postgresql related packages installed on your system, use :

dpkg -l postgres*

(note : lower case 'l')


to list the files each installed package provides, use :

dpkg -L package-name

e.g. : dpkg -L postgresql-client-8.4

(note : upper case 'L')


-- 
Vincent Veyron
http://marica.fr/
Logiciel de gestion des assurances sinistres et des dossiers contentieux pour 
le service juridique



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


Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Magnus Hagander
On Thu, Nov 1, 2012 at 4:32 PM, Kevin Burton rkevinbur...@charter.netwrote:

 This is probably a question for the authors of a book I have been reading
 but it may be faster to get an answer here.

 ** **

 I was trying to follow along in a book ‘Seven Databases in Seven Weeks’
 and chapter 2 deals with PostgreSQL. One of the first things it does is
 issue a command ‘createdb book’. The text before this command says, “Once
 you have Postgres installed, create a schema called book using the
 following command: $ createdb book’ But when I tried to issue this command
 (at a Linux command prompt) I get ‘createdb command not found’. Are the
 authors out of date? What is the current command?

 **


The authors are incorrect, in that this doesn't actually create a schema.
It creates a database. but they are not out of tdate, just incorrect - it
has never created a schema.

That said, the createdb command ships with postgresql still and should be
avaiable. Exactly where it is depends on how you installed PostgreSQL, and
which distribution of Linux you are on. You can probably find it with
find, or by looking at the contents of whichever package you used to
install it.

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


Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Leif Biberg Kristensen
 Torsdag 1. november 2012 16.32.42 skrev Kevin Burton :
 This is probably a question for the authors of a book I have been reading
 but it may be faster to get an answer here.
 
 
 
 I was trying to follow along in a book 'Seven Databases in Seven Weeks' and
 chapter 2 deals with PostgreSQL. One of the first things it does is issue a
 command 'createdb book'. The text before this command says, Once you have
 Postgres installed, create a schema called book using the following
 command: $ createdb book' But when I tried to issue this command (at a
 Linux command prompt) I get 'createdb command not found'. Are the authors
 out of date? What is the current command?

leif@balapapa ~ $ which createdb
/usr/bin/createdb


regards, Leif


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


Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Kevin Burton
I type 'find createdb' and I get an error find: 'createdb' no such file or
directory.

 

From: Magnus Hagander [mailto:mag...@hagander.net] 
Sent: Thursday, November 01, 2012 10:38 AM
To: Kevin Burton
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Where is 'createdb'?

 

 

On Thu, Nov 1, 2012 at 4:32 PM, Kevin Burton rkevinbur...@charter.net
wrote:

This is probably a question for the authors of a book I have been reading
but it may be faster to get an answer here.

 

I was trying to follow along in a book 'Seven Databases in Seven Weeks' and
chapter 2 deals with PostgreSQL. One of the first things it does is issue a
command 'createdb book'. The text before this command says, Once you have
Postgres installed, create a schema called book using the following command:
$ createdb book' But when I tried to issue this command (at a Linux command
prompt) I get 'createdb command not found'. Are the authors out of date?
What is the current command?

 

The authors are incorrect, in that this doesn't actually create a schema. It
creates a database. but they are not out of tdate, just incorrect - it has
never created a schema.

 

That said, the createdb command ships with postgresql still and should be
avaiable. Exactly where it is depends on how you installed PostgreSQL, and
which distribution of Linux you are on. You can probably find it with
find, or by looking at the contents of whichever package you used to
install it.


 

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



Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Christopher Opena
You're using find in your current working directory.  It seems you may need
an introduction to find for Ubuntu (based on your other thread it seems
you're using PostgreSQL 9.1 on Ubuntu):

https://help.ubuntu.com/community/find

On Thu, Nov 1, 2012 at 8:41 AM, Kevin Burton rkevinbur...@charter.netwrote:

 I type ‘find createdb’ and I get an error find: ‘createdb’ no such file or
 directory.

 ** **

 *From:* Magnus Hagander [mailto:mag...@hagander.net]
 *Sent:* Thursday, November 01, 2012 10:38 AM
 *To:* Kevin Burton
 *Cc:* pgsql-general@postgresql.org
 *Subject:* Re: [GENERAL] Where is 'createdb'?

 ** **

 ** **

 On Thu, Nov 1, 2012 at 4:32 PM, Kevin Burton rkevinbur...@charter.net
 wrote:

 This is probably a question for the authors of a book I have been reading
 but it may be faster to get an answer here.

  

 I was trying to follow along in a book ‘Seven Databases in Seven Weeks’
 and chapter 2 deals with PostgreSQL. One of the first things it does is
 issue a command ‘createdb book’. The text before this command says, “Once
 you have Postgres installed, create a schema called book using the
 following command: $ createdb book’ But when I tried to issue this command
 (at a Linux command prompt) I get ‘createdb command not found’. Are the
 authors out of date? What is the current command?

 ** **

 The authors are incorrect, in that this doesn't actually create a schema.
 It creates a database. but they are not out of tdate, just incorrect - it
 has never created a schema.

 ** **

 That said, the createdb command ships with postgresql still and should be
 avaiable. Exactly where it is depends on how you installed PostgreSQL, and
 which distribution of Linux you are on. You can probably find it with
 find, or by looking at the contents of whichever package you used to
 install it.
 

 ** **

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



Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Christopher Opena
What version of PostgreSQL did you install and how did you install it?  I
have 9.2.1 and it installed createdb into the default /usr/bin/ path, as
did 9.1 and 9.0 before it (installed via yum in my case).

On Thu, Nov 1, 2012 at 8:32 AM, Kevin Burton rkevinbur...@charter.netwrote:

 This is probably a question for the authors of a book I have been reading
 but it may be faster to get an answer here.

 ** **

 I was trying to follow along in a book ‘Seven Databases in Seven Weeks’
 and chapter 2 deals with PostgreSQL. One of the first things it does is
 issue a command ‘createdb book’. The text before this command says, “Once
 you have Postgres installed, create a schema called book using the
 following command: $ createdb book’ But when I tried to issue this command
 (at a Linux command prompt) I get ‘createdb command not found’. Are the
 authors out of date? What is the current command?

 ** **

 Kevin



Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Steve Crawford

On 11/01/2012 08:41 AM, Kevin Burton wrote:


I type 'find createdb' and I get an error find: 'createdb' no such 
file or directory.



Which exact OS/distribution/PostgreSQL-version are you using and how was 
PostgreSQL installed (OS-provided or 3rd-party)? The different packagers 
deal with things in a variety of ways almost all of which are different 
than how PostgreSQL will be installed if compiling from source with 
default options.


Ubuntu, for example, will typically include a (non-PostgreSQL-provided) 
helper package called postgresql-common which is designed to ease 
running multiple versions of PostgreSQL on a single machine. It also 
allows different users to connect to different clusters and has some 
version-to-version update facilities (which were more important in the 
pre-pg_upgrade era).


In Ubuntu, therefore, executables, data and configuration are in 
version-specific subdirectories (/usr/lib/postgresql/VERSION/..., 
/etc/postgresql/VERSION/..., /var/lib/postgresql/VERSION/...) and 
commands like createdb (/usr/bin/createdb) are actually links to 
/usr/share/postgresql-common/pg_wrapper which loads the appropriate 
user/version-specific executable (e.g. 
/usr/lib/postgresql/9.1/bin/createdb).


But RHEL/CentOS has a somewhat different layout as do other 
distributions and OSs and the layouts have evolved over time so what was 
correct for, say, Ubuntu 9.04 will differ from 12.10. Similarly, a 
general installer like EnterpriseDB's one-click installer will use a 
different layout than the distribution-specific installations.


Cheers,
Steve



Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Prashanth Kumar
Here is what i did  on a Ubuntu linux server.  I had installed postgres using 
apt-get install postgres.
pkumar@ulinux1:~$ sudo su - postgres[sudo] password for pkumar: 
postgres@ulinux3:~$ createdb authDBpostgres@ulinux3:~$ createuser -P -l authuser

You have to sudo into postgres or fix your classpath
From: rkevinbur...@charter.net
To: pgsql-general@postgresql.org
Subject: [GENERAL] Where is 'createdb'?
Date: Thu, 1 Nov 2012 10:32:42 -0500

This is probably a question for the authors of a book I have been reading but 
it may be faster to get an answer here. I was trying to follow along in a book 
‘Seven Databases in Seven Weeks’ and chapter 2 deals with PostgreSQL. One of 
the first things it does is issue a command ‘createdb book’. The text before 
this command says, “Once you have Postgres installed, create a schema called 
book using the following command: $ createdb book’ But when I tried to issue 
this command (at a Linux command prompt) I get ‘createdb command not found’. 
Are the authors out of date? What is the current command? Kevin 


Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Chris Angelico
On Fri, Nov 2, 2012 at 2:37 AM, Magnus Hagander mag...@hagander.net wrote:

 On Thu, Nov 1, 2012 at 4:32 PM, Kevin Burton rkevinbur...@charter.net
 wrote:

 The text before this command says, “Once
 you have Postgres installed, create a schema called book using the following
 command: $ createdb book’

 The authors are incorrect, in that this doesn't actually create a schema. It
 creates a database. but they are not out of tdate, just incorrect - it has
 never created a schema.

Sounds like the author has a MySQL background, where schema and
database are synonyms. (I have no idea why MySQL doesn't just use
schema and declare that there's only one database per install.
That would be much simpler.)

ChrisA


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


Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Boszormenyi Zoltan

2012-11-01 16:32 keltezéssel, Kevin Burton írta:


This is probably a question for the authors of a book I have been reading but it may be 
faster to get an answer here.


I was trying to follow along in a book 'Seven Databases in Seven Weeks' and chapter 2 
deals with PostgreSQL. One of the first things it does is issue a command 'createdb 
book'. The text before this command says, Once you have Postgres installed, create a 
schema called book using the following command: $ createdb book' But when I tried to 
issue this command (at a Linux command prompt) I get 'createdb command not found'. Are 
the authors out of date? What is the current command?


Kevin



The instructions start with Once you have Postgres installed
Since the command is not available, you don't have Postgres installed.

$ which createdb
/usr/bin/createdb
$ rpm -q --whatprovides /usr/bin/createdb
postgresql-9.1.6-1.fc17.x86_64

Best regards,
Zoltán Böszörményi

--
--
Zoltán Böszörményi
Cybertec Schönig  Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de
 http://www.postgresql.at/



Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Steve Crawford

On 11/01/2012 02:10 PM, Boszormenyi Zoltan wrote:

2012-11-01 16:32 keltezéssel, Kevin Burton írta:
...I get 'createdb command not found'. Are the authors out of date? 
What is the current command?





The instructions start with Once you have Postgres installed
Since the command is not available, you don't have Postgres installed.
This is not correct. What it means is that the command you typed is not 
in your search path or aliased in some way. The command may very well be 
available elsewhere (see my earlier post in the thread for an example of 
where Ubuntu places things).


$ which createdb
/usr/bin/createdb
$ rpm -q --whatprovides /usr/bin/createdb
postgresql-9.1.6-1.fc17.x86_64

Useful on rpm-based distros but I believe the OP is running a 
Debian-derivative which uses apt.


Cheers,
Steve



Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Kevin Burton
I watched while the OS was installed and it looked like postgres was
installed but the Ubuntu package apparently didn’t install it all or it
didn’t install it correctly. 

 

From: Steve Crawford [mailto:scrawf...@pinpointresearch.com] 
Sent: Thursday, November 01, 2012 4:43 PM
To: Boszormenyi Zoltan
Cc: Kevin Burton; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Where is 'createdb'?

 

On 11/01/2012 02:10 PM, Boszormenyi Zoltan wrote:

2012-11-01 16:32 keltezéssel, Kevin Burton írta:

...I get ‘createdb command not found’. Are the authors out of date? What is
the current command? 

 






The instructions start with Once you have Postgres installed
Since the command is not available, you don't have Postgres installed.

This is not correct. What it means is that the command you typed is not in
your search path or aliased in some way. The command may very well be
available elsewhere (see my earlier post in the thread for an example of
where Ubuntu places things).




$ which createdb
/usr/bin/createdb
$ rpm -q --whatprovides /usr/bin/createdb
postgresql-9.1.6-1.fc17.x86_64

Useful on rpm-based distros but I believe the OP is running a
Debian-derivative which uses apt.

Cheers,
Steve



Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Steve Crawford

On 11/01/2012 02:49 PM, Kevin Burton wrote:


I watched while the OS was installed and it looked like postgres was 
installed but the Ubuntu package apparently didn't install it all or 
it didn't install it correctly.


You may have installed a portion of PostgreSQL - possibly just the 
client stuff (psql, libraries and such needed to connect to a PostgreSQL 
server). The deb package is usually called postgresql-client-VERSION. 
Make sure you have installed the server which is just called 
postgresql-VERSION.


Optionally you can install postgresql-contrib which contains a large 
variety of available extensions (the package installs them on your 
machine but you have to selectively install the specific extensions you 
want into your database - see create extension and look for info on 
contrib).


You can also install a variety of languages for use in writing 
procedural functions in PostgreSQL (plperl, plpython, pllua, pltcl, ...).


Cheers,
Steve



Re: [GENERAL] Where do I get pgAdmin 1.16 for openSuSE?

2012-09-13 Thread Devrim GÜNDÜZ

Hi,

On Wed, 2012-09-12 at 20:51 -0700, Mike Christensen wrote:
 In file included from ../pgadmin/include/pgAdmin3.h:24:0,
  from ./pgAdmin3.cpp:13:
 ../pgadmin/include/ctl/ctlSQLBox.h:17:24: fatal error: wx/stc/stc.h:
 No such file or directory
 compilation terminated. 

Here is the buildRequires that I found on a SuSE spec for pgadmin3:

BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libopenssl-devel
BuildRequires:  libxml2-devel
BuildRequires:  libxslt-devel
BuildRequires:  postgresql-devel
BuildRequires:  update-desktop-files
BuildRequires:  wxWidgets
BuildRequires:  wxWidgets-wxcontainer-devel

So, you probably need the last two packages for the error you wrote.

Regards,
-- 
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz


signature.asc
Description: This is a digitally signed message part


  1   2   3   4   >