Re: [GENERAL] Date math

2009-06-27 Thread Guy Flaherty
On Sun, Jun 28, 2009 at 2:52 PM, Joe Conway wrote: > Adam Rich wrote: > >> Hello, >> I have a table with a DATE field "birth_date". The data obviously >> contains various dates in the past, such as 07/04/1970. In my query, I need >> to retrieve the person's "next" birthday. In other words, for

Re: [GENERAL] horizontal sharding

2009-06-27 Thread Greg Smith
On Fri, 26 Jun 2009, mobiledream...@gmail.com wrote: 2009-06-26 18:48:34 ERROR: pid 5563: pool_read_int: data does not match between between master(0) slot[1] (50331648) 2009-06-26 18:48:34 ERROR: pid 5563: pool_do_auth: read auth kind failed My guess is that you have different types of conne

Re: [GENERAL] Date math

2009-06-27 Thread Joe Conway
Adam Rich wrote: Hello, I have a table with a DATE field "birth_date". The data obviously contains various dates in the past, such as 07/04/1970. In my query, I need to retrieve the person's "next" birthday. In other words, for the example date 07/04/1970, the query should return 07/04/2009

Re: Fwd: [GENERAL] Date math

2009-06-27 Thread Justin
Adam Rich wrote: > Guy Flaherty wrote: >> >> >> You could use the extract() function to calculate the day of year of the person's birthdate and then check if this number is within today's day of year and range of days you want to check for, for example, today's day of year + 30 days to be withi

Re: Fwd: [GENERAL] Date math

2009-06-27 Thread Adam Rich
Guy Flaherty wrote: On Sun, Jun 28, 2009 at 1:52 PM, Adam Rich > wrote: Hello, I have a table with a DATE field "birth_date". The data obviously contains various dates in the past, such as 07/04/1970. In my query, I need to retrieve the person's "ne

Fwd: [GENERAL] Date math

2009-06-27 Thread Guy Flaherty
On Sun, Jun 28, 2009 at 1:52 PM, Adam Rich wrote: > Hello, > I have a table with a DATE field "birth_date". The data obviously contains > various dates in the past, such as 07/04/1970. In my query, I need to > retrieve the person's "next" birthday. In other words, for the example date > 07/04/

Re: [GENERAL] Free OLAP software for Postgres databas

2009-06-27 Thread Joshua Tolley
On Sat, Jun 27, 2009 at 02:04:13PM -0700, Michal Szymanski wrote: > > > I've used Pentaho with pgsql and it worked pretty well.  I'm pretty > > sure jasper as well can work with pgsql. > > Where can I find information how to install Pentaho on Postgres? Do > you use free edition? We also both t

[GENERAL] Date math

2009-06-27 Thread Adam Rich
Hello, I have a table with a DATE field "birth_date". The data obviously contains various dates in the past, such as 07/04/1970. In my query, I need to retrieve the person's "next" birthday. In other words, for the example date 07/04/1970, the query should return 07/04/2009 for the current

Re: [GENERAL] Switching from MySQL: ON DUPLICATE KEY UPDATE, plpgsql function

2009-06-27 Thread Greg Stark
On Sun, Jun 28, 2009 at 2:13 AM, justin wrote: > > if you want to do something like this either do a test first to see if the > key is present in the table, update or do an insert like this > There is no reason to do a loop in the function waiting for a lock to > clear.   Postgresql Locks do not wo

Re: [GENERAL] [Q] sequence and index name limits in 8.4

2009-06-27 Thread Tom Lane
Scott Marlowe writes: > On Sat, Jun 27, 2009 at 7:09 PM, V S P wrote: >> Searched docs and the web but only saw references to the older version >> of postgres >> where changing source code was recommended ( NAMEDATALEN) if more than >> 31 characters >> in the names are desired. > Unless you want

Re: [GENERAL] [Q] sequence and index name limits in 8.4

2009-06-27 Thread Scott Marlowe
On Sat, Jun 27, 2009 at 7:09 PM, V S P wrote: > Searched docs and the web but only saw references to the older version > of postgres > where changing source code was recommended ( NAMEDATALEN) if more than > 31 characters > in the names are desired. > > wanted to ask if this is still the case in 8.

Re: [GENERAL] Switching from MySQL: ON DUPLICATE KEY UPDATE, plpgsql function

2009-06-27 Thread Martin Gainty
contempating installing a insert,update trigger on forums_topics table something like SET search_path = public; CREATE TRIGGER "MyTableName_Trig" AFTER INSERT OR DELETE OR UPDATE ON "forum_topics" FOR EACH ROW EXECUTE PROCEDURE "FORUM_CATCH_UP_ALL" (); HTH Martin

Re: [GENERAL] Switching from MySQL: ON DUPLICATE KEY UPDATE, plpgsql function

2009-06-27 Thread justin
APseudoUtopia wrote: Hey list, I have a query which allows users to "Catch up" on read posts on the forum. It works by either updating or inserting the "last post read" number from every forum thread into the readposts table (for that userid and threadid combination, of course). Here's the

[GENERAL] [Q] sequence and index name limits in 8.4

2009-06-27 Thread V S P
Searched docs and the web but only saw references to the older version of postgres where changing source code was recommended ( NAMEDATALEN) if more than 31 characters in the names are desired. wanted to ask if this is still the case in 8.4 (I need at least 128) thank you in advance, VSP -- Vla

[GENERAL] Switching from MySQL: ON DUPLICATE KEY UPDATE, plpgsql function

2009-06-27 Thread APseudoUtopia
Hey list, I'm migrating my site away from MySQL to PostgreSQL. So far, it's been going great. However, there's one problem I've been having trouble solving. I have a query which allows users to "Catch up" on read posts on the forum. It works by either updating or inserting the "last post read" nu

Re: [GENERAL] Free OLAP software for Postgres databas

2009-06-27 Thread Scott Marlowe
On Sat, Jun 27, 2009 at 3:04 PM, Michal Szymanski wrote: > >> I've used Pentaho with pgsql and it worked pretty well.  I'm pretty >> sure jasper as well can work with pgsql. > > Where can  I find information how to install Pentaho on Postgres? Do > you use free edition? We used the free version, a

Re: [GENERAL] Free OLAP software for Postgres databas

2009-06-27 Thread Michal Szymanski
> I've used Pentaho with pgsql and it worked pretty well.  I'm pretty > sure jasper as well can work with pgsql. Where can I find information how to install Pentaho on Postgres? Do you use free edition? Regards Michal Szymanski -- Sent via pgsql-general mailing list (pgsql-general@postgresql.

Re: [GENERAL] pasting into psql garbles text

2009-06-27 Thread Tom Lane
Merlin Moncure writes: > I'm starting to feel like my problems start appearing at a very fixed > size (like you, a few hundred or so). Do you see this in other > programs (bash, vim, etc)? or only psql? I've only noticed it in psql, but there are not that many other programs that I tend to past

Re: [GENERAL] pasting into psql garbles text

2009-06-27 Thread Merlin Moncure
On Sat, Jun 27, 2009 at 2:56 PM, Greg Stark wrote: > On Sat, Jun 27, 2009 at 7:26 PM, Merlin Moncure wrote: >> >> It doesn't matter the source application...it borks regardless if I >> copy from Source insight/wine (my normal editor), gedit, or another >> gnome terminal. > > Are these all gtk apps?

Re: [GENERAL] Free OLAP software for Postgres databas

2009-06-27 Thread Joe Conway
Scott Marlowe wrote: On Sat, Jun 27, 2009 at 1:45 PM, Michal Szymanski wrote: Hi, I'm looking for free software that provide OLAP functionality (or more general BI) for data that are stored in Postgres database. I've found Pentaho and Jasper but both sollution are configured for MySQL. Can you

Re: [GENERAL] Free OLAP software for Postgres databas

2009-06-27 Thread Scott Marlowe
On Sat, Jun 27, 2009 at 1:45 PM, Michal Szymanski wrote: > Hi, > I'm looking for free software that provide OLAP functionality (or more > general BI) for data that are stored in Postgres database. I've found > Pentaho and Jasper  but both sollution are configured for MySQL. Can > you recomend somet

Re: [GENERAL] pasting into psql garbles text

2009-06-27 Thread Tom Lane
Merlin Moncure writes: > I confirmed that xterm does not exhibit the issue. So this is at > least partially a terminal problem. However, xterm does not directly > accept pastes from wine clipboard apparently. it only works if I copy > it to gedit first, then into xterm. > The _only_ terminal ap

[GENERAL] Free OLAP software for Postgres databas

2009-06-27 Thread Michal Szymanski
Hi, I'm looking for free software that provide OLAP functionality (or more general BI) for data that are stored in Postgres database. I've found Pentaho and Jasper but both sollution are configured for MySQL. Can you recomend something that works with postgres? Regards -- Sent via pgsql-general

Re: [GENERAL] Optimal values for 500 connections

2009-06-27 Thread David Fetter
On Fri, Jun 26, 2009 at 07:52:43PM +0100, Pedro Doria Meunier wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi all, > > I'm wondering what are the correct values in postgresql.conf for > max_connections = 500 ... You can either increase your shared memory settings or see about a c

Re: [GENERAL] pasting into psql garbles text

2009-06-27 Thread Greg Stark
On Sat, Jun 27, 2009 at 7:26 PM, Merlin Moncure wrote: > > It doesn't matter the source application...it borks regardless if I > copy from Source insight/wine (my normal editor), gedit, or another > gnome terminal. Are these all gtk apps? Try pasting from an emacs or xterm? -- greg http://mit.ed

Re: [GENERAL] pasting into psql garbles text

2009-06-27 Thread Merlin Moncure
On Sat, Jun 27, 2009 at 1:38 PM, Greg Stark wrote: > On Sat, Jun 27, 2009 at 6:19 PM, Merlin Moncure wrote: >> I've noticed over a wide variety of operating systems that when you >> paste from an application into psql through a terminal (currently >> using the default gnome terminal in ubuntu) > >

Re: [GENERAL] pasting into psql garbles text

2009-06-27 Thread Leif B. Kristensen
On Saturday 27. June 2009, Merlin Moncure wrote: >I've noticed over a wide variety of operating systems that when you >paste from an application into psql through a terminal (currently >using the default gnome terminal in ubuntu), large pastes tend to get >garbled with some of the input getting tru

Re: [GENERAL] pasting into psql garbles text

2009-06-27 Thread Greg Stark
On Sat, Jun 27, 2009 at 6:19 PM, Merlin Moncure wrote: > I've noticed over a wide variety of operating systems that when you > paste from an application into psql through a terminal (currently > using the default gnome terminal in ubuntu) You should get yourself a real terminal. Even Ubuntu hides

[GENERAL] pasting into psql garbles text

2009-06-27 Thread Merlin Moncure
I've noticed over a wide variety of operating systems that when you paste from an application into psql through a terminal (currently using the default gnome terminal in ubuntu), large pastes tend to get garbled with some of the input getting truncated. While working on functions, this is annoying

Re: [GENERAL] Need suggestions

2009-06-27 Thread Alban Hertroys
On Jun 25, 2009, at 9:26 PM, Jack W wrote: > I can not shut down > just one database because all the the databases will be shut down, right? True, but why are you shutting databases down? Maybe for maintainence purpose or schema change. For example as you mentioned above, if using several

Re: [GENERAL] horizontal sharding

2009-06-27 Thread mobiledreamers
yeah i have never tried slony and i didnt try plproxy as it is a new language and need to modify all client code not modifiying client code in pgpool 2 rocks On Sat, Jun 27, 2009 at 12:52 AM, Scott Marlowe wrote: > Oh crap I think I mixed it up in my head with slony II. nevermind. :) > > On Sa

Re: [GENERAL] horizontal sharding

2009-06-27 Thread Scott Marlowe
Oh crap I think I mixed it up in my head with slony II. nevermind. :) On Sat, Jun 27, 2009 at 1:17 AM, wrote: > no it is very good and well designed the whole app code doesnt need to > change > > we jus need to configure the pgpool insertion logic > > and it has a cool pgpooladmin in php like p

Re: [GENERAL] horizontal sharding

2009-06-27 Thread mobiledreamers
no it is very good and well designed the whole app code doesnt need to change we jus need to configure the pgpool insertion logic and it has a cool pgpooladmin in php like phppgadmin if only i can get it to work On Fri, Jun 26, 2009 at 10:53 PM, Scott Marlowe wrote: > I thought pgool II was ab