Re: [gentoo-user] postgresql 9.5.2 versus Gentoo wiki install instructions?

2016-05-20 Thread J. Roeleveld
Longer answer:

On Friday, May 20, 2016 10:36:41 PM waltd...@waltdnes.org wrote:
>   Yes, I did RTFM at https://wiki.gentoo.org/wiki/PostgreSQL/QuickStart
> and that's part of my problem.   I figured it would be a simple
> search and replace "9.3" ==> "9.5" in the wiki, but...

A quick scan should indicate that.
However:
PG_INITDB_OPTS="--locale=en_US.UTF-8 --lc-messages=sv_SE.UTF-8"
is wrong. See below.

> 1) The wiki recommends...
> PG_INITDB_OPTS="--locale=en_US.UTF-8"

Where did you configure this?

I did the following:
# cat /etc/conf.d/postgresql-9.5 | grep -i utf
PG_INITDB_OPTS="--encoding=UTF8"


> ...but I get...
> 
> > The database cluster will be initialized with locale "en_US.iso88591".
> > initdb: "en_US.UTF8" is not a valid server encoding name
> 
> "locale -a" returns...
> C
> POSIX
> en_US
> en_US.iso88591
> en_US.utf8

Postgresql only uses the codepage, not the localisation ("en_US") part.

> 2) The wiki says...
> 
> > This time the focus is upon the files in the PGDATA directory,
> > /etc/postgresql-9.3 , instead with primary focus on the
> > postgresql.conf and pg_hba.conf files.
> 
> "ls /etc/postgresql-9.5/" returns...
> postgresql.conf  psqlrc
> 
> but postgresql seems to want them in /var/lib instead...
> 
> > mv: cannot stat '/var/lib/postgresql/9.5/data/pg_hba.conf': No such
> > file or directory
> > mv: cannot stat '/var/lib/postgresql/9.5/data/pg_ident.conf': No
> > such file or directory
> > mv: cannot stat '/var/lib/postgresql/9.5/data/postgresql.conf':
> > No such file or directory
> 
>   Can somebody please confirm the correct way to go?

Did you run 
emerge --config dev-db/postgresql:9.5
succesfully?

>   Why I want postgresql... I've been keeping a bunch of data in a
> spreadsheet, and it's gotten too large.  The spreadsheet locks up my
> system when I try to update it.  I've used "top" and watched as
> gnumeric's memory consumption grows to eat all available ram.  It locks
> up the system so I can't even ssh in.  This is on an X86_64 with 8 gigs
> of RAM!  Fortunately, "magic-sysrq" allows a relatively clean shutdown.
> While we're at it, is there a way for gnumeric to pull in data directly
> from postgresql?  ODBC?  I'm aware of copying from postgresql to a CSV
> file and importing that, but it's rather clunky.

There are ODBC and native drivers. You need to check which have support 
directly. Look for "postgres" USE-flags in spreadsheet applications.

>   My main problem is that columns of several thousand rows are functions
> based on other columns of several thousand rows.  For the time-being,
> I've split up the spreadsheet into a few pieces, but a database is the
> best solution.  If I could run the calculations in the database, and
> pull in the final results as static numbers for graphing, that would
> greatly reduce the strain on the spreadsheet.  Or is it possible to
> graph directly from postgresql?

Not to my knowledge, I tend to use spreadsheets or graphics libraries in C++ 
GUI applications. (Still playing with the latter, so not the best resource for 
that)

>   I used to work with Oracle and PL/SQL before I retired, so I think I
> know what I'm getting into as far as the database stuff is concerned.
> Once I get past the Gentoo-specific install problems, I'll subscribe to
> a postgresql mailing list, and ask postgresql-specific questions there.

Postgresql has it's own procedural language, might be nice to look into that 
in that case.

I would suggest the USER-mailing list.
The development one (HACKERS) deals with the actual internals, not something 
most users would be interested in.

--
Joost



Re: [gentoo-user] postgresql 9.5.2 versus Gentoo wiki install instructions?

2016-05-20 Thread J. Roeleveld
On May 21, 2016 4:36:41 AM GMT+02:00, waltd...@waltdnes.org wrote:
>  Yes, I did RTFM at https://wiki.gentoo.org/wiki/PostgreSQL/QuickStart
>and that's part of my problem.   I figured it would be a simple
>search and replace "9.3" ==> "9.5" in the wiki, but...
>
>1) The wiki recommends...
>PG_INITDB_OPTS="--locale=en_US.UTF-8"
>
>...but I get...
>
>> The database cluster will be initialized with locale
>"en_US.iso88591".
>> initdb: "en_US.UTF8" is not a valid server encoding name
>
>"locale -a" returns...
>C
>POSIX
>en_US
>en_US.iso88591
>en_US.utf8
>
>2) The wiki says...
>> This time the focus is upon the files in the PGDATA directory,
>> /etc/postgresql-9.3 , instead with primary focus on the
>> postgresql.conf and pg_hba.conf files.
>
>"ls /etc/postgresql-9.5/" returns...
>postgresql.conf  psqlrc
>
>but postgresql seems to want them in /var/lib instead...
>
>> mv: cannot stat '/var/lib/postgresql/9.5/data/pg_hba.conf': No such
>> file or directory
>> mv: cannot stat '/var/lib/postgresql/9.5/data/pg_ident.conf': No
>> such file or directory
>> mv: cannot stat '/var/lib/postgresql/9.5/data/postgresql.conf':
>> No such file or directory
>
>  Can somebody please confirm the correct way to go?
>
>  Why I want postgresql... I've been keeping a bunch of data in a
>spreadsheet, and it's gotten too large.  The spreadsheet locks up my
>system when I try to update it.  I've used "top" and watched as
>gnumeric's memory consumption grows to eat all available ram.  It locks
>up the system so I can't even ssh in.  This is on an X86_64 with 8 gigs
>of RAM!  Fortunately, "magic-sysrq" allows a relatively clean shutdown.
>While we're at it, is there a way for gnumeric to pull in data directly
>from postgresql?  ODBC?  I'm aware of copying from postgresql to a CSV
>file and importing that, but it's rather clunky.
>
> My main problem is that columns of several thousand rows are functions
>based on other columns of several thousand rows.  For the time-being,
>I've split up the spreadsheet into a few pieces, but a database is the
>best solution.  If I could run the calculations in the database, and
>pull in the final results as static numbers for graphing, that would
>greatly reduce the strain on the spreadsheet.  Or is it possible to
>graph directly from postgresql?
>
>  I used to work with Oracle and PL/SQL before I retired, so I think I
>know what I'm getting into as far as the database stuff is concerned.
>Once I get past the Gentoo-specific install problems, I'll subscribe to
>a postgresql mailing list, and ask postgresql-specific questions there.

Quick response. Longer one later when I have access to the database server.

I don't use the wiki, instead I follow the post-emerge messages.

UTF8 is possible. I only use that.
Not sure about gnumeric, bit libreoffice can read directly from postgresql.
ODBC is not as simple on Linux as it is on Windows. But when configured, it 
should work as well. 
Exporting data to CSV is mentioned in several howtos and in the manpage of psql 
(commandline tool)

--
Joost 
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



[gentoo-user] postgresql 9.5.2 versus Gentoo wiki install instructions?

2016-05-20 Thread waltdnes
  Yes, I did RTFM at https://wiki.gentoo.org/wiki/PostgreSQL/QuickStart
and that's part of my problem.   I figured it would be a simple
search and replace "9.3" ==> "9.5" in the wiki, but...

1) The wiki recommends...
PG_INITDB_OPTS="--locale=en_US.UTF-8"

...but I get...

> The database cluster will be initialized with locale "en_US.iso88591".
> initdb: "en_US.UTF8" is not a valid server encoding name

"locale -a" returns...
C
POSIX
en_US
en_US.iso88591
en_US.utf8

2) The wiki says...
> This time the focus is upon the files in the PGDATA directory,
> /etc/postgresql-9.3 , instead with primary focus on the
> postgresql.conf and pg_hba.conf files.

"ls /etc/postgresql-9.5/" returns...
postgresql.conf  psqlrc

but postgresql seems to want them in /var/lib instead...

> mv: cannot stat '/var/lib/postgresql/9.5/data/pg_hba.conf': No such
> file or directory
> mv: cannot stat '/var/lib/postgresql/9.5/data/pg_ident.conf': No
> such file or directory
> mv: cannot stat '/var/lib/postgresql/9.5/data/postgresql.conf':
> No such file or directory

  Can somebody please confirm the correct way to go?

  Why I want postgresql... I've been keeping a bunch of data in a
spreadsheet, and it's gotten too large.  The spreadsheet locks up my
system when I try to update it.  I've used "top" and watched as
gnumeric's memory consumption grows to eat all available ram.  It locks
up the system so I can't even ssh in.  This is on an X86_64 with 8 gigs
of RAM!  Fortunately, "magic-sysrq" allows a relatively clean shutdown.
While we're at it, is there a way for gnumeric to pull in data directly
from postgresql?  ODBC?  I'm aware of copying from postgresql to a CSV
file and importing that, but it's rather clunky.

  My main problem is that columns of several thousand rows are functions
based on other columns of several thousand rows.  For the time-being,
I've split up the spreadsheet into a few pieces, but a database is the
best solution.  If I could run the calculations in the database, and
pull in the final results as static numbers for graphing, that would
greatly reduce the strain on the spreadsheet.  Or is it possible to
graph directly from postgresql?

  I used to work with Oracle and PL/SQL before I retired, so I think I
know what I'm getting into as far as the database stuff is concerned.
Once I get past the Gentoo-specific install problems, I'll subscribe to
a postgresql mailing list, and ask postgresql-specific questions there.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



[gentoo-user] Surviving perl-5.24.0

2016-05-20 Thread walt
I spent most of today updating from perl-5.22 to perl-5.24 because so
many packages failed to install.  I ran perl-cleaner about a hundred
times and tried emerge -ac in between, which always failed because it
falsely accused me of not doing emerge -auND.

Finally I got through the perl update and noticed a message saying
'emerge -auND --with-bdeps=y is the ultimate way to update...' so I
added the '--with-bdeps=y' and another twenty perl-related packages got
rebuilt after I thought I was done.

Now I'm really done, I think, but I'm afraid to reboot this machine.