[GENERAL] i386 postgres on i686 debian with multiarch

2014-11-30 Thread Damian Dimmich
Hi, I'm trying to set up a replica for a postgres 9.3 instance running on an older i386 debian install, replicating to a 64 bit install. Having enabled multi-arch** support on the 64 bit debian by running: dpkg --add-architecture i386 and trying to install: apt-get install

Re: [GENERAL] i386 postgres on i686 debian with multiarch

2014-11-30 Thread rob stone
On Sun, 2014-11-30 at 15:17 +0400, Damian Dimmich wrote: Hi, I'm trying to set up a replica for a postgres 9.3 instance running on an older i386 debian install, replicating to a 64 bit install. Having enabled multi-arch** support on the 64 bit debian by running: dpkg

Re: [GENERAL] When was ANALYZE run in the past?

2014-11-30 Thread Vincent Veyron
On Sat, 29 Nov 2014 15:27:07 -0500 Benjamin Rutt rut...@osu.edu wrote: I run autovacuum under a default configuration, but I suspect ANALYZE is not running frequently enough for my purposes (when I ran the above command on my table, it consistently returned 1.4 million for ~20 minutes

Re: [GENERAL] When was ANALYZE run in the past?

2014-11-30 Thread Adrian Klaver
On 11/30/2014 06:55 AM, Vincent Veyron wrote: On Sat, 29 Nov 2014 15:27:07 -0500 Benjamin Rutt rut...@osu.edu wrote: I run autovacuum under a default configuration, but I suspect ANALYZE is not running frequently enough for my purposes (when I ran the above command on my table, it consistently

Re: [GENERAL] i386 postgres on i686 debian with multiarch

2014-11-30 Thread Damian Dimmich
Hi Rob, Thank you for your response: cat /var/lib/dpkg/arch gives: amd64 i386 I did update after adding i386- I don't think it would have found postgresql-9.3:i386 otherwise. Further reading indicates that packages can explicitly support multi-arch and permit (some) dependent packages to

[GENERAL] Remote PostgreSQL database - C/C++ program / Unix / Required Libraries

2014-11-30 Thread Léa Massiot
Hello and thank you for reading my post. I would like to write a C/C++ program which targets a remote PostgreSQL database. I don't know what to install, which libraries to link to in this program. In more details: Given: 1.1) a PostgreSQL database db on a machine A, 1.2) a machine B. I would

[GENERAL] Re: Remote PostgreSQL database - C/C++ program / Unix / Required Libraries

2014-11-30 Thread Léa Massiot
Me again. Sorry. This looks good too: Building libpq Programs: http://www.postgresql.org/docs/9.1/static/libpq-build.html But what do I need to install on B? Best regards. -- View this message in context:

[GENERAL] JSON_AGG produces extra square brakets

2014-11-30 Thread Davide S
I'm using JSON_AGG to create some arrays, but I get an invalid json (I'm using the latest postgres 9.4 in debian testing). Quick explanation: I've got some objects called Things that have Tags (many-to-many through the table ThingTag); Things also have a single ThingTemplate, which has

Re: [GENERAL] Remote PostgreSQL database - C/C++ program / Unix / Required Libraries

2014-11-30 Thread Adrian Klaver
On 11/30/2014 11:44 AM, Léa Massiot wrote: Hello and thank you for reading my post. I would like to write a C/C++ program which targets a remote PostgreSQL database. I don't know what to install, which libraries to link to in this program. In more details: Given: 1.1) a PostgreSQL database db

[GENERAL] to_char(timestamp, format) is changing the year!

2014-11-30 Thread Stephen Woodbridge
Hi, I am have a problem when I format a timestamp in that it is changing the year. This can't be right, so either I don't understand or I have found a nasty corner case bug. This does not happen on all dates select '2014-12-31 00:00:00'::timestamp without time zone,

Re: [GENERAL] to_char(timestamp, format) is changing the year!

2014-11-30 Thread Adrian Klaver
On 11/30/2014 01:05 PM, Stephen Woodbridge wrote: Hi, I am have a problem when I format a timestamp in that it is changing the year. This can't be right, so either I don't understand or I have found a nasty corner case bug. This does not happen on all dates select '2014-12-31

Re: [GENERAL] to_char(timestamp, format) is changing the year!

2014-11-30 Thread Steve Atkins
On Nov 30, 2014, at 1:05 PM, Stephen Woodbridge wood...@swoodbridge.com wrote: Hi, I am have a problem when I format a timestamp in that it is changing the year. This can't be right, so either I don't understand You're using IYYY which is the ISO year, which is based on Mondays or

[GENERAL] Re: Remote PostgreSQL database - C/C++ program / Unix / Required Libraries

2014-11-30 Thread Léa Massiot
Thank you for your answer :) Adrian Klaver-4 wrote: My guess is you want is way to install the minimum necessary to write a C/C++ file against the Postgres libraries. Is this correct? Exactly. Adrian Klaver-4 wrote: If so you will need to either install the appropriate -dev package,

Re: [GENERAL] to_char(timestamp, format) is changing the year!

2014-11-30 Thread Stephen Woodbridge
Hi Adrain, Thank you for the explanation. I was trying to send some data to a Javascript library worked with ISO dates. But you are correct I wanted not IYYY, that totally sliped by me. Thanks, -Steve On 11/30/2014 4:19 PM, Adrian Klaver wrote: On 11/30/2014 01:05 PM, Stephen

Re: [GENERAL] Re: Remote PostgreSQL database - C/C++ program / Unix / Required Libraries

2014-11-30 Thread John R Pierce
On 11/30/2014 2:03 PM, Léa Massiot wrote: I actually asked the question out of curiosity. (And also because I was working on a machine with no PostgreSQL installed. I was wondering if I had to install a whole PostgreSQL system or not). In the RH/CentOS/Fedora world, you CAN install just the

Re: [GENERAL] JSON_AGG produces extra square brakets

2014-11-30 Thread Tom Lane
Davide S swept.along.by.eve...@gmail.com writes: Note that the tags are just fine, but the arrays with the states have an increasing number of square brackets at the end: the first has 1 (correct), the second has 2, the third has 3, etc., which is invalid json. Could you provide a

[GENERAL] Ever increasing pg_clog disk usage v8.4

2014-11-30 Thread Powrie, William
Hello, I have a simple database with just a few tables that runs on an embedded Linux system 2.6.31.8. The OS including postresql 8.4 is loaded directly from cf-flash media and is not saved in any way across power recycles. It is always created at startup from the /inittab/rc script and nearly