Re: [GENERAL] Risk of set system wise statement_timeout

2013-09-12 Thread Tom Lane
Alex Lai writes: > I have been reading few posted comment about the risk for autovacuum for > older postgres liek version 8. > I am currently running 9.2.4. autovacuum ignores any system-wide setting of statement_timeout (and lock_timeout, where applicable) in all versions back to at least 8.3.

Re: [GENERAL] Risk of set system wise statement_timeout

2013-09-12 Thread Alex Lai
On 09/12/2013 10:09 AM, Giuseppe Broccolo wrote: Il 11/09/2013 22:02, Alex Lai ha scritto: I have been reading few posted comment about the risk for autovacuum for older postgres liek version 8. I am currently running 9.2.4. We have a need to terminate any query running longer than 2 hours. M

Re: [GENERAL] Best way to populate nested composite type from JSON`

2013-09-12 Thread Chris Travers
On Thu, Sep 12, 2013 at 8:47 AM, Merlin Moncure wrote: > > > Can we see a hypothetical example? json best practices for me are to > use standard tables and than serialize/deserialize json as it goes > through the door and not use nested composite types in your actual > table definitions. I thin

Re: [GENERAL] Sum of columns

2013-09-12 Thread BladeOfLight16
On Mon, Sep 9, 2013 at 8:12 AM, Marc Mamin wrote: > hi, > > in addition to the others comments, you can also remove " ELSE 0 " from > your query. > > It will result in values that are discarded by SUM. > > For that matter, you could clean this up by using COUNT as your aggregate with a

Re: [GENERAL] problem with query

2013-09-12 Thread David Johnston
Roberto Scattini wrote > what makes the 'ñ' char special that makes the queries the same when it is > not there? My knowledge here is a little rough around the edges but the following is conceptually true: For the most part legacy encodings (or non-encodings as this case technically falls under)

Re: [GENERAL] problem with query

2013-09-12 Thread Rodrigo Gonzalez
On Thu, 12 Sep 2013 19:07:04 -0300 Roberto Scattini wrote: > On Thu, Sep 12, 2013 at 7:02 PM, Bosco Rama > wrote: > > > On 09/12/13 14:49, Chris Curvey wrote: > > > Is this just a case-sentitvity issue? if personas.apellido is a > > > varchar field, then I think that's your trouble. (it would

Re: [GENERAL] 9.2 Replication in Ubuntu ; need help

2013-09-12 Thread Suzuki Hironobu
Which value does pg_is_recovery() return on the primary server? (13/09/13 0:58), AI Rumman wrote: Yes, I can access to the primary server perfectly. On Thu, Sep 12, 2013 at 11:55 AM, Suzuki Hironobuwrote: Hi, (13/09/12 23:53), AI Rumman wrote: Hi, I am trying to setup replication wit

Re: [GENERAL] problem with query

2013-09-12 Thread Bosco Rama
On 09/12/13 14:49, Chris Curvey wrote: > Is this just a case-sentitvity issue? if personas.apellido is a varchar > field, then I think that's your trouble. (it would have to be citext in > order for "nunez" = "NUNEZ".) He's using 'ilike' in his query, so this is more likely to be a locale/charse

Re: [GENERAL] problem with query

2013-09-12 Thread Roberto Scattini
On Thu, Sep 12, 2013 at 6:49 PM, Chris Curvey wrote: > >> > Is this just a case-sentitvity issue? if personas.apellido is a varchar > field, then I think that's your trouble. (it would have to be citext in > order for "nunez" = "NUNEZ".) > > > yes, is just a case-sensitivity issue. yes, is a va

Re: [GENERAL] problem with query

2013-09-12 Thread Bosco Rama
On 09/12/13 15:07, Roberto Scattini wrote: > hi bosco, in fact i believe that i have that problem... but i cant > undestand why and how to fix it. > > the database has SQL_ASCII encoding, and my client... i am not sure, when i > connect directly with psql from localhost i must set client encoding

Re: [GENERAL] problem with query

2013-09-12 Thread John R Pierce
On 9/12/2013 3:03 PM, Roberto Scattini wrote: yes, is just a case-sensitivity issue. yes, is a varchar field. but what i dont understand is why the problem of "insensitivity" is only with ñ (lower). i mean, if i remove my ñ (and subsecuent chars), both querys return the same rows: SQLASCII m

Re: [GENERAL] problem with query

2013-09-12 Thread Chris Curvey
On Thu, Sep 12, 2013 at 5:33 PM, Roberto Scattini < roberto.scatt...@gmail.com> wrote: > > > On Thu, Sep 12, 2013 at 6:22 PM, Chris Curvey wrote: > >> >> >> On Thu, Sep 12, 2013 at 4:34 PM, Roberto Scattini < >> roberto.scatt...@gmail.com> wrote: >> >>> >>> we are using postgresql 9.1 from ubuntu

Re: [GENERAL] problem with query

2013-09-12 Thread Roberto Scattini
On Thu, Sep 12, 2013 at 7:02 PM, Bosco Rama wrote: > On 09/12/13 14:49, Chris Curvey wrote: > > Is this just a case-sentitvity issue? if personas.apellido is a varchar > > field, then I think that's your trouble. (it would have to be citext in > > order for "nunez" = "NUNEZ".) > > He's using 'i

Re: [GENERAL] problem with query

2013-09-12 Thread Roberto Scattini
On Thu, Sep 12, 2013 at 6:22 PM, Chris Curvey wrote: > > > On Thu, Sep 12, 2013 at 4:34 PM, Roberto Scattini < > roberto.scatt...@gmail.com> wrote: >> >> >> we are using postgresql 9.1 from ubuntu packages and the database >> encoding is (sadly) SQL_ASCII >> >> can anybody point me in the right d

Re: [GENERAL] problem with query

2013-09-12 Thread Chris Curvey
On Thu, Sep 12, 2013 at 4:34 PM, Roberto Scattini < roberto.scatt...@gmail.com> wrote: > hi, today we discovered that this query doesn't return the expected values: > > SELECT DISTINCT > p.id, p.apellido AS "Apellido", p.nombre AS "Nombre", pf.nombre AS > "Funcion", to_char(da.f_ingreso_pg, 'dd/m

[GENERAL] problem with query

2013-09-12 Thread Roberto Scattini
hi, today we discovered that this query doesn't return the expected values: SELECT DISTINCT p.id, p.apellido AS "Apellido", p.nombre AS "Nombre", pf.nombre AS "Funcion", to_char(da.f_ingreso_pg, 'dd/mm/') AS "Fecha Ingreso PG", e.estado AS "Estado", to_char(pe.fecha, 'dd/mm/') AS "Fecha E

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-12 Thread Andreas 'ads' Scherbaum
On 09/12/2013 07:44 PM, Thomas Harold wrote: On 9/3/2013 6:08 PM, Andreas 'ads' Scherbaum wrote: PostgreSQL folks! We are looking for the next big thing. Actually, it's a bit smaller: a new design for mugs. So far we had big blue elephants, small blue elephants, frosty elephants, white SQL cod

[GENERAL] Major upgrade of PostgreSQL and MySQL

2013-09-12 Thread Patrick Dung
While reading some manual of PostgreSQL and MySQL (eg. http://dev.mysql.com/doc/refman/5.1/en/upgrading-from-previous-series.html). I have found that MySQL has stated many incompatibilities and know issues (a long list) in the MySQL version 5.0, 5.1, 5.5, 5.6 and 5.7. For PostgreSQL, it seems I

Re: [GENERAL] Major upgrade of PostgreSQL and MySQL

2013-09-12 Thread Thomas Kellerer
Patrick Dung wrote on 12.09.2013 18:11: For PostgreSQL, it seems I can't find the list (it just say see the Appendix E / release notes). I think it is a plus for PostgreSQL if it has few incompatibilities between major versions. There is such a list in the release notes: http://www.postgresql.

Re: [GENERAL] Major upgrade of PostgreSQL and MySQL

2013-09-12 Thread Thomas Kellerer
Merlin Moncure wrote on 12.09.2013 18:37: By the way, for in-place major version upgrade (not dumping DB and import again), MySQL is doing a better job in here. http://www.postgresql.org/docs/9.3/static/pgupgrade.html pgupgrade has nothing to do with this: that's just a tool that does in plac

Re: [GENERAL] Major upgrade of PostgreSQL and MySQL

2013-09-12 Thread Merlin Moncure
On Thu, Sep 12, 2013 at 11:21 AM, Raymond O'Donnell wrote: > On 12/09/2013 17:11, Patrick Dung wrote: >> By the way, for in-place major version upgrade (not dumping DB and >> import again), MySQL is doing a better job in here. > > http://www.postgresql.org/docs/9.3/static/pgupgrade.html pgupgrade

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-12 Thread Mike Christensen
Oooh can we make the handle an elephant trunk? (Ok, now I'm sure I'm adding all sorts of expense - but hey you'll save so much money using Postgres you can afford an expensive coffee mug!) On Thu, Sep 12, 2013 at 5:30 AM, Andreas 'ads' Scherbaum < adsm...@wars-nicht.de> wrote: > On 09/10/2013 10

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-12 Thread Thomas Harold
On 9/3/2013 6:08 PM, Andreas 'ads' Scherbaum wrote: PostgreSQL folks! We are looking for the next big thing. Actually, it's a bit smaller: a new design for mugs. So far we had big blue elephants, small blue elephants, frosty elephants, white SQL code on black mugs ... Now it's time to design so

[GENERAL] Danger of renaming an enum label?

2013-09-12 Thread Evan Martin
I'd like to rename one of the labels of an enum in PostgreSQL 9.2 This can easily be done by updating pg_enum, as described at http://tech.valgog.com/2010/08/alter-enum-in-postgresql.html but I'd like to understand: what is the danger of doing so? If, as the post says, the data only references

Re: [GENERAL] Major upgrade of PostgreSQL and MySQL

2013-09-12 Thread Joshua D. Drake
On 09/12/2013 09:37 AM, Merlin Moncure wrote: On Thu, Sep 12, 2013 at 11:21 AM, Raymond O'Donnell wrote: On 12/09/2013 17:11, Patrick Dung wrote: By the way, for in-place major version upgrade (not dumping DB and import again), MySQL is doing a better job in here. http://www.postgresql.org

Re: [GENERAL] Major upgrade of PostgreSQL and MySQL

2013-09-12 Thread Patrick Dung
From: Thomas Kellerer To: pgsql-general@postgresql.org Sent: Friday, September 13, 2013 12:58 AM Subject: Re: [GENERAL] Major upgrade of PostgreSQL and MySQL > There is such a list in the release notes: > >http://www.postgresql.org/docs/current/static/release-9-3.html#AEN114132 >    Version

Re: [GENERAL] 9.2 Replication in Ubuntu ; need help

2013-09-12 Thread AI Rumman
Yes, I can access to the primary server perfectly. On Thu, Sep 12, 2013 at 11:55 AM, Suzuki Hironobu wrote: > Hi, > > > (13/09/12 23:53), AI Rumman wrote: > >> Hi, >> >> I am trying to setup replication with Postgresql 9.2 in Ubuntu on Amazon >> Ec2. >> But stuck in the process. >> Postgresql

Re: [GENERAL] 9.2 Replication in Ubuntu ; need help

2013-09-12 Thread Michael Paquier
On Thu, Sep 12, 2013 at 7:53 AM, AI Rumman wrote: > psql > 2013-09-12 14:48:04 UTC FATAL: the database system is starting up > > I configured replication for Centos so many times and followed those steps. > Is there something I am missing? Perhaps hot_standby = on in the slave's postgresql.conf?

Re: [GENERAL] 9.2 Replication in Ubuntu ; need help

2013-09-12 Thread Suzuki Hironobu
Hi, (13/09/12 23:53), AI Rumman wrote: Hi, I am trying to setup replication with Postgresql 9.2 in Ubuntu on Amazon Ec2. But stuck in the process. Postgresql standby log is showing: 2013-09-12 14:45:47 UTC LOG: entering standby mode 2013-09-12 14:45:47 UTC LOG: redo starts at 1/3920 2013

Re: [GENERAL] Best way to populate nested composite type from JSON`

2013-09-12 Thread Merlin Moncure
On Wed, Sep 11, 2013 at 11:55 PM, Chris Travers wrote: > Hi everyone; > > I have been starting to experiment with the JSON accessors in 9.3. I > immediately found that my preferred use, populating nested composite types, > is not supported. Also of course one cannot manipulate JSON nodes, which

Re: [GENERAL] Major upgrade of PostgreSQL and MySQL

2013-09-12 Thread Karl Denninger
On 9/12/2013 11:11 AM, Patrick Dung wrote: > While reading some manual of PostgreSQL and MySQL (eg. > http://dev.mysql.com/doc/refman/5.1/en/upgrading-from-previous-series.html). > > I have found that MySQL has stated many incompatibilities and know > issues (a long list) in the MySQL version 5.0,

Re: [GENERAL] Small PosgreSQL locking function request - with bounty

2013-09-12 Thread rob stone
On Thu, 2013-09-12 at 06:40 -0500, David Noel wrote: > I have a few database queries that I've been running from within a > Java project. I have recently come to the understanding that I need to > run them instead within the PostgreSQL server as stored functions. I > have that understanding becau

Re: [GENERAL] Major upgrade of PostgreSQL and MySQL

2013-09-12 Thread Raymond O'Donnell
On 12/09/2013 17:11, Patrick Dung wrote: > By the way, for in-place major version upgrade (not dumping DB and > import again), MySQL is doing a better job in here. http://www.postgresql.org/docs/9.3/static/pgupgrade.html -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql

[GENERAL] 9.2 Replication in Ubuntu ; need help

2013-09-12 Thread AI Rumman
Hi, I am trying to setup replication with Postgresql 9.2 in Ubuntu on Amazon Ec2. But stuck in the process. Postgresql standby log is showing: 2013-09-12 14:45:47 UTC LOG: entering standby mode 2013-09-12 14:45:47 UTC LOG: redo starts at 1/3920 2013-09-12 14:45:47 UTC LOG: record with zero

Re: [GENERAL] Need help with Inet type

2013-09-12 Thread rob stone
On Wed, 2013-09-11 at 21:49 -0700, arohi wrote: > Hi All, > > I am trying to install postgresql-jdbc but facing java error. sun java is > already installed but postgresql-jdbc installing openjdj. please let me know > how to resolve this and if you require any other details. > > > > - > AR

Re: [GENERAL] Risk of set system wise statement_timeout

2013-09-12 Thread Giuseppe Broccolo
Il 11/09/2013 22:02, Alex Lai ha scritto: I have been reading few posted comment about the risk for autovacuum for older postgres liek version 8. I am currently running 9.2.4. We have a need to terminate any query running longer than 2 hours. Most of our query should finish within 15 minutes.

Re: [GENERAL] Need help with Inet type

2013-09-12 Thread arohi
Hi All, I am trying to install postgresql-jdbc but facing java error. sun java is already installed but postgresql-jdbc installing openjdj. please let me know how to resolve this and if you require any other details. - AROHI -- View this message in context: http://postgresql.1045698.n5.nab

Re: [GENERAL] Trouble with replication

2013-09-12 Thread againstdemons84
I appreciate that this is a few months old however we had apparently identical symptoms but on a Windows platform. In the end we discovered that the reason the WAL archives that existed on the slave were not being restored was because the Windows account postgres was running as (Network Service) d

Re: [GENERAL] Small PosgreSQL locking function request - with bounty

2013-09-12 Thread Ralf Schuchardt
Hi David, have you used the "for update" clause in your select statements? With this clause "select" locks the selected row(s) in a table for modifications and other "select for updates". My understanding is, that "for update" does what you need. You can execute your select and update statement

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-12 Thread Andreas 'ads' Scherbaum
On 09/10/2013 10:15 PM, Kevin Grittner wrote: patrick keshishian wrote: One more "cute" idea that came to me last night. Here is a very poor attempt at it by yours truly; keep in mind I'm not a graphics artist. This image is for illustration purposes only! http://sidster.com/gallery/20

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-12 Thread Andreas 'ads' Scherbaum
On 09/09/2013 10:22 PM, patrick keshishian wrote: On 9/3/13, Andreas 'ads' Scherbaum wrote: PostgreSQL folks! We are looking for the next big thing. Actually, it's a bit smaller: a new design for mugs. So far we had big blue elephants, small blue elephants, frosty elephants, white SQL code on

[GENERAL] Small PosgreSQL locking function request - with bounty

2013-09-12 Thread David Noel
I have a few database queries that I've been running from within a Java project. I have recently come to the understanding that I need to run them instead within the PostgreSQL server as stored functions. I have that understanding because I need to make use of locking functionality, and that seems