Longer answer:
On Friday, May 20, 2016 10:36:41 PM [email protected] wrote:
> Yes, I did RTFM at https://wiki.gentoo.org/wiki/PostgreSQL/QuickStart
> and that's part of my problem. <G> 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