5,320 reputation
1726
bio website manitou-mail.org/about-dv.php
location Paris, France
age
visits member for 3 years
seen 33 mins ago

Let's try to share the bits of knowledge gained during those innumerable hours of programming... Nowadays I use mostly PostgreSQL, C++/Qt, Perl, php on Unix servers.


2d
awarded  Custodian
2d
reviewed Close data calling from one page to another?
2d
reviewed Leave Open Genghis admin ui not working with mongodb 3.0.1 wired tiger
2d
awarded  Custodian
2d
reviewed Leave Open hierarchical query
2d
reviewed Leave Open PostgreSQL trigger copy record to another table with different columns order
2d
comment PostgreSQL trigger copy record to another table with different columns order
If hstore(NEW.*) works with 8.4, you might use that to reconstruct a dynamic insert with column names in any order as hstore keys, and column values as corresponding hstore values.
Mar
23
comment Maximum Partitioning PostgreSQL
These numbers look too small for partitioning to make sense. 400K records total is really not that much nowadays, and a partition with 10K records is super-tiny.
Mar
22
comment List all columns and rows of PostgreSQL table with a view limit
Create a view where long columns are replaced by substr(long_column,N)
Mar
21
comment Trouble renaming a PostgreSQL database
what's missing: probably a semi-colon at the end of the ALTER command, assuming that you didn't copy verbatim the next prompt. This should be -# instead of =#
Mar
19
comment Getting SSL Working
the ssl=on line is solely sufficient to...: if no certificates are installed, yes, you can't use ssl. Please read first postgresql.org/docs/current/static/ssl-tcp.html
Mar
19
answered Could this ActiveRecord/SQL statement in my code base be susceptible to SQL injection?
Mar
19
comment Recommended Postgres settings to speed up indexing on a 100GB database?
utf-8 is not a collation, it's an encoding (i.e. the rules telling how characters are converted to bytes and reciprocally), and it's not mutually exclusive with the C locale. C.UTF-8 as the lc_collate and lc_ctype of a database is acceptable and even quite possibly the best choice in your case.
Mar
18
reviewed Approve Merge-Replication: New column doesn't get replicated down by update command
Mar
18
comment How to return updated data from UPDATE … FROM query?
This query returns values from tbl2: No, it returns all columns of tbl1 and all columns of tbl2, modeled after an equivalent select * with the same tables and clauses.
Mar
18
comment Where do you find the citext module in postgres 9.3 on ubuntu 14.04?
packages.ubuntu.com/trusty/postgresql-contrib-9.3
Mar
17
comment pg_hba.conf and postgresql.conf in old installation directory
A quick websearch does not find it for me, but hopefully MacPorts or someone has documented how to upgrade to a newer major server version. A dump/reload is certainly needed (the data directories are not compatible across major versions)
Mar
17
comment pg_hba.conf and postgresql.conf in old installation directory
Try psql -U postgres -c 'select version()'. This will probably show that you're running a 9.3 server. The 9.4.1 reported by psql --version is the client-side. Presumably postgresql94 for MacPorts does not contain the server, it's another package.
Mar
14
comment PostgreSQL - is it possible to use a plpgsql function in a bash script?
This function "upserts" one row at a time in a way that works with concurrent writers. But if you need to mass-merge from a single source, it will perform much better to import into a temp table and reconcile data with UPDATE dest.. FROM temptable WHERE join-condition followed by INSERT INTO dest... SELECT from temptable WHERE NOT EXISTS(...)
Mar
11
comment What is the impact of LC_CTYPE on a PostgreSQL database?
Also note that individual columns may have a COLLATE specifier that differs from the database's.