Re: [GENERAL] Installing Postgress 8.0.5 in Ubuntu 10.12

2013-02-14 Thread Albe Laurenz
Vick Khera wrote: > There are some implicit casting changes that broke some of my code > when 8.2 came out. You mean 8.3, right? Yours, Laurenz Albe -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pg

Re: [GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-14 Thread Jeffrey Jones
Hello All I have updated the gist with the correction and tried again this evening but that error is still occurring. Thanks Jeff On 14/02/13 09:06, Jeffrey Jones wrote: Hi Devrim Damn, sorry that was a typo, I had to manually copy the output, sorry. Thanks Jeff On 14/02/13 01:08, Devr

Re: [GENERAL] Visual query builder for PosgreSQL?

2013-02-14 Thread Guillaume Lelarge
On Fri, 2013-02-08 at 11:37 +, Russell Keane wrote: > > I'm looking for some good visual query builder which can be used by > > non-tech people for some ETL tasks. Do you have any recommendation? > > > > Now, we're moving our data from Excel to PostgreSQL to deal with large > > amount of data

Re: [GENERAL] Howto see template objects in PGAdmin3

2013-02-14 Thread Guillaume Lelarge
On Tue, 2013-02-12 at 15:32 -0500, James B. Byrne wrote: > PG-9.2 > PGAdmin3-1.16.0 > > I have run into an old problem wherein the postgres user has ownership > of the PSQL language extension in a newly created database. I wish to > remove this extension from template1 as the database is automati

Re: [GENERAL] Join query query

2013-02-14 Thread Amit Kapila
On Thursday, February 14, 2013 4:31 AM Andrew Taylor wrote: > Hi, > I'd like to do something which I think should be quite easy - that is join 2 tables and create a new table. > Table A postcode_input has columns which include postcode, eastings, northings. there are 1,687,605 rows. > Table B bng

[GENERAL] Query becomes slow when written as view

2013-02-14 Thread Jan Strube
Hi, I have the following query which runs reasonably fast under PostgreSQL 9.1.8: SELECT b."ISIN", CASE WHEN b."COMMENT" IS NOT NULL THEN b."COMMENT" WHEN cc."ISIN" IS NOT NULL THEN cc.comment ELSE get_comment(b."ISIN") END AS "COMMENT" FROM dtng."Z_BASE" b LEFT JOIN dtng.cached_comments cc on

Re: [GENERAL] Runtime variations during day

2013-02-14 Thread Vick Khera
On Wed, Feb 13, 2013 at 4:35 PM, Kevin Grittner wrote: > seq_page_cost = 0.1 > random_page_cost = 0.1 > Is there any gain in setting these to the same low value, as it would to leave them both at 4? I thought they are just relative numbers to each other. And unless you're on SSD, these numbers

Re: [GENERAL] Query becomes slow when written as view

2013-02-14 Thread Merlin Moncure
On Thu, Feb 14, 2013 at 7:23 AM, Jan Strube wrote: > Hi, > > I have the following query which runs reasonably fast under PostgreSQL > 9.1.8: > > SELECT > b."ISIN", > CASE > WHEN b."COMMENT" IS NOT NULL THEN b."COMMENT" > WHEN cc."ISIN" IS NOT NULL THEN cc.comment > ELSE get_comment(b."ISIN") > END

Re: [GENERAL] Query becomes slow when written as view

2013-02-14 Thread Jan Strube
is your function stable/immutable, and if so is it decorated as such. merlin No, it´s volatile. Jan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Installing Postgress 8.0.5 in Ubuntu 10.12

2013-02-14 Thread Vick Khera
On Thu, Feb 14, 2013 at 3:15 AM, Albe Laurenz wrote: > Vick Khera wrote: > > There are some implicit casting changes that broke some of my code > > when 8.2 came out. > > You mean 8.3, right? > Based on further discussion in this thread, yes.

Re: [GENERAL] Howto see template objects in PGAdmin3

2013-02-14 Thread James B. Byrne
On Thu, February 14, 2013 06:23, Guillaume Lelarge wrote: > On Tue, 2013-02-12 at 15:32 -0500, James B. Byrne wrote: >> PG-9.2 >> PGAdmin3-1.16.0 >> >> I am attempting to do this from inside PGAdmin3 but I find that I no >> longer see either template0 or template1 in the object tree. Where >> ar

Re: [GENERAL] Query becomes slow when written as view

2013-02-14 Thread Tom Lane
Jan Strube writes: >> is your function stable/immutable, and if so is it decorated as such. > No, it´s volatile. Well, that's your problem. The planner won't push down the IN clause past the volatile function for fear of changing the query's side-effects. I'd question whether it's sane to have

Re: [GENERAL] Runtime variations during day

2013-02-14 Thread Jeff Janes
On Thu, Feb 14, 2013 at 5:31 AM, Vick Khera wrote: > > On Wed, Feb 13, 2013 at 4:35 PM, Kevin Grittner wrote: >> >> seq_page_cost = 0.1 >> random_page_cost = 0.1 > > > Is there any gain in setting these to the same low value, as it would to > leave them both at 4? I thought they are just relativ

[GENERAL] PGbouncer and batch vs real-time pools

2013-02-14 Thread François Beausoleil
Hello all, >From reading the PGbouncer configuration man page, PGbouncer creates a new >pool on every DB + user pair. If I have two types of queries, long-lived batch >reporting and fast PK lookups, then I should favor two pools. Both pools can >hit the same database server. I can configure pg

[GENERAL] bug, bad memory, or bad disk?

2013-02-14 Thread Ben Chobot
We have a Postgres server (PostgreSQL 9.1.6 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit) which does streaming replication to some slaves, and has another set of slaves reading the wal archive for wal-based replication. We had a bit of fun yesterday w

[GENERAL] Need regexp_replace help

2013-02-14 Thread Gauthier, Dave
Trying ( and failing) to get this to run... select regexp_replace(pg_get_functiondef(proname::regproc),E'[ ]+\\+\n','\n') from pg_proc where proname = 'maketime'; Goal is to remove the space padding and the "+" at the end of each line in the dump of pg_get_functiondef, something that could actu

Re: [GENERAL] Need regexp_replace help

2013-02-14 Thread Merlin Moncure
On Thu, Feb 14, 2013 at 3:37 PM, Gauthier, Dave wrote: > Trying ( and failing) to get this to run... > > > > select regexp_replace(pg_get_functiondef(proname::regproc),E'[ > ]+\\+\n','\n') from pg_proc where proname = 'maketime'; > > > > Goal is to remove the space padding and the "+" at the end o

Re: [GENERAL] Howto see template objects in PGAdmin3

2013-02-14 Thread John R Pierce
On 2/14/2013 7:06 AM, James B. Byrne wrote: CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; plpgsql is a LANGUAGE, not an extension, I thought? you use CREATE LANGUAGE to enable it.. -- john r pierce 37N 122W somewhere on the middle of the

[GENERAL] SCALE goes to 11, and so does PostgreSQL!

2013-02-14 Thread Joe Conway
PGDay SoCal Date: 2013-02-22 Location: Los Angeles, CA, United States Language: English PGDay Southern California is organized by the LA and San Diego Postgres Users' Groups, and hosted by SCALE11X Please join us for a PGDay mini-conference on Friday 22 February 2013 at SCALE11X located at the Hi

[GENERAL] Immutable functions, Exceptions and the Query Optimizer

2013-02-14 Thread Cochise Ruhulessin
Hello all, If an immutable function raises an exception, is that exception cached by the query optimizer? Or does it only cache in the case that a function actually returns a value? The use case is a table books(book_id NOT NULL PRIMARY KEY, type_id) wherein type_id is considered immutable (enfor

[GENERAL] Avoiding duplication of code via views -- slower? How do people typically do this?

2013-02-14 Thread Joe Van Dyk
See https://gist.github.com/joevandyk/4957646/raw/86d55472ff8b5a4a6740d9c673d18a7005738467/gistfile1.txtfor the code. I have promotions(id, end_at, quantity) and promotion_usages(promotion_id). I have a couple of things I typically want to retrieve, and I'd like those things to be composable. In

Re: [GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-14 Thread Jeffrey Jones
Hello Devrim and co I downloaded http://yum.postgresql.org/9.2/redhat/rhel-6Server-x86_64/repodata/primary.sqlite.bz2 using wget on the afected computer and ran md5sum over it with the following result: 9258bd5672cf7abb55a0d95ee2467afc primary.sqlite.bz2 I have downloaded it from a few sep

Re: [GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-14 Thread Stephen Frost
* Jeffrey Jones (jjo...@toppan-f.co.jp) wrote: > I downloaded > http://yum.postgresql.org/9.2/redhat/rhel-6Server-x86_64/repodata/primary.sqlite.bz2 > using wget on the afected computer and ran md5sum over it with the > following result: > > 9258bd5672cf7abb55a0d95ee2467afc primary.sqlite.bz2 T

Re: [GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-14 Thread Jeffrey Jones
Hi Stephen. On 15/02/13 10:52, Stephen Frost wrote: * Jeffrey Jones (jjo...@toppan-f.co.jp) wrote: I downloaded http://yum.postgresql.org/9.2/redhat/rhel-6Server-x86_64/repodata/primary.sqlite.bz2 using wget on the afected computer and ran md5sum over it with the following result: 9258bd5672c

Re: [GENERAL] Avoiding duplication of code via views -- slower? How do people typically do this?

2013-02-14 Thread Jack Christensen
Joe Van Dyk wrote: See https://gist.github.com/joevandyk/4957646/raw/86d55472ff8b5a4a6740d9c673d18a7005738467/gistfile1.txt for the code. I have promotions(id, end_at, quantity) and promotion_usages(promotion_id). I have a couple of things I typically want to retrieve, and I'd like those t

Re: [GENERAL] PGbouncer and batch vs real-time pools

2013-02-14 Thread Sergey Konoplev
On Thu, Feb 14, 2013 at 9:09 AM, François Beausoleil wrote: > I believe the important user is the one pgbouncer uses to connect to the real > PostgreSQL server. That user + dbname is what creates a new pool. The > client's name (the one the app connects as) is irrelevant since I hard-code > wha

Re: [GENERAL] Howto see template objects in PGAdmin3

2013-02-14 Thread Adrian Klaver
On 02/14/2013 03:11 PM, John R Pierce wrote: On 2/14/2013 7:06 AM, James B. Byrne wrote: CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; plpgsql is a LANGUAGE, not an extension, I thought? you use CREATE LANGUAGE to enable it.. http://www.postgresql.org/docs/9.2/interactive/

[GENERAL] pg_upgrade

2013-02-14 Thread Ian Harding
When I run pg_upgrade, it tries to start the old cluster with the -w flag, which waits a while and declares failure, even though it starts the server. If I start/stop without -w everything is great. Can I tell pg_upgrade not to use that flag, or is there a reason it is not working that I should l

Re: [GENERAL] pg_upgrade

2013-02-14 Thread Ian Lawrence Barwick
2013/2/15 Ian Harding > When I run pg_upgrade, it tries to start the old cluster with the -w flag, > which waits a while and declares failure, even though it starts the > server. If I start/stop without -w everything is great. > > Can I tell pg_upgrade not to use that flag, or is there a reason

Re: [GENERAL] pg_upgrade

2013-02-14 Thread Ian Harding
Old is 8.4, new is 9.2. I am not supplying an but the minimum options and --check succeeds. My pg_ctl fails when run by hand with -w (although the database does start) so I know that's the issue. On Feb 14, 2013, at 9:50 PM, Ian Lawrence Barwick wrote: > 2013/2/15 Ian Harding >> When I run

Re: [GENERAL] pg_upgrade

2013-02-14 Thread Ian Lawrence Barwick
2013/2/15 Ian Harding > > > On Feb 14, 2013, at 9:50 PM, Ian Lawrence Barwick wrote: > > 2013/2/15 Ian Harding >> >> When I run pg_upgrade, it tries to start the old cluster with the -w flag, >> which waits a while and declares failure, even though it starts the server. >> If I start/stop wit

Re: [GENERAL] Avoiding duplication of code via views -- slower? How do people typically do this?

2013-02-14 Thread Joe Van Dyk
On Thu, Feb 14, 2013 at 6:31 PM, Jack Christensen wrote: > Joe Van Dyk wrote: > >> See https://gist.github.com/**joevandyk/4957646/raw/** >> 86d55472ff8b5a4a6740d9c673d18a**7005738467/gistfile1.txt

Re: [GENERAL] Avoiding duplication of code via views -- slower? How do people typically do this?

2013-02-14 Thread Chris Travers
On Thu, Feb 14, 2013 at 4:32 PM, Joe Van Dyk wrote: > See > https://gist.github.com/joevandyk/4957646/raw/86d55472ff8b5a4a6740d9c673d18a7005738467/gistfile1.txtfor > the code. > > I have promotions(id, end_at, quantity) and promotion_usages(promotion_id). > > I have a couple of things I typicall