Re: [GENERAL] ERROR: cache lookup failed for relation X

2010-04-03 Thread raghavendra t
> > Hi Justin, Thank you for your reply.. > In the future please don't cross post to multiple lists. Appoligies for it... Regards Raghavendra On Sat, Apr 3, 2010 at 10:34 PM, jus...@magwerks.com wrote: > Because You dropped/deleted the table cache in Session A. > > The simplest way to loo

Re: [GENERAL] ERROR: cache lookup failed for relation X

2010-04-03 Thread raghavendra t
Hi Tom, Thank you for your Prompt reply.. Am getting this error only in the application level that too with multiple sessions. By getting that error am assuming that the table has got dropped in some other session. I understood from here is that its not a serious problem to catalog Corruption. Re

Re: [GENERAL] Connection Pooling

2010-04-03 Thread Merlin Moncure
On Fri, Mar 26, 2010 at 5:17 PM, David Kerr wrote: > Howdy all, > > I have some apps that are connecting to my DB via direct JDBC and I'd like to > pool their connections. > > I've been looking at poolers for a while, and pgbouncer and pgpool-ii seem to > be some of the most popular, so > i've s

Re: [GENERAL] Connection Pooling

2010-04-03 Thread Lew
Allan Kamau wrote: You may also have a look at Commons DBCP from Apache software foundation, "http://commons.apache.org/dbcp/";. I have used it for a few projects and have had no problems. John R Pierce wrote: for that matter, JDBC has its own connection pooling in java. David Kerr wrote: It

Re: [GENERAL] How to implement word wrap

2010-04-03 Thread Andrus
Really, write a stored procedure that accepts (text, line_length) and returns SETOF text. You could even add hyphenation for the appropriate language if you go that route. For the latter it's probably best to write it in C so you can link hyphenation libraries to your code. Another approach that

Re: [GENERAL] any built-in function to get time in seconds?

2010-04-03 Thread Scott Bailey
zhong ming wu wrote: I have been using this one liner c function that I call my_now() to get the number of seconds since some fixed point in the past. I find it more convenient than built-in now() and if I want abstime I do abstime(my_now()). Thing is everytime I do a major version upgrade I h

Re: [GENERAL] count function alternative in postgres

2010-04-03 Thread Scott Bailey
junaid malik wrote: Is there any alternative of mysql function COUNT(DISTINCT expr, [expr...]) in postgres. We get error if we write count like this count(distinct profile.id, profile.name, profile.age) but it works well in mysql. Reference url is given below http://dev.mysql.com/doc/refman/5.

Re: [GENERAL] ERROR: cache lookup failed for relation X

2010-04-03 Thread Tom Lane
raghavendra t writes: > I am facing the error "cache lookup failed for relation X" in Postgres-8.4.2 > [ when dropping the same table concurrently in two sessions ] > Could plese tell me, why this is generated and what is the cause. >From the perspective of session B, the table disappeared after

Re: [GENERAL] ERROR: cache lookup failed for relation X

2010-04-03 Thread jus...@magwerks.com
Because You dropped/deleted the table cache in Session A. The simplest way to look at it is Session B was lock out when the Drop table command was issued from Session A. Now when session B finally got its chance to drop/delete the table it was already gone . What kind error were you expecting f

[GENERAL] ERROR: cache lookup failed for relation X

2010-04-03 Thread raghavendra t
Hi All, I am facing the error "cache lookup failed for relation X" in Postgres-8.4.2 version. As you all know, its a reproducable and below is the example. This can be generated with two sessions; Am opening two sessions here Session A and Session B Session A = step 1 - creating the table

Re: [GENERAL] count function alternative in postgres

2010-04-03 Thread Tom Lane
junaid malik writes: > Is there any alternative of mysql function COUNT(DISTINCT expr, > [expr...]) in postgres. We get error if we The SQL-standard way to do that would be select count(*) from (select distinct expr,expr,... from ...) as ss; COUNT with multiple arguments is not anywhere in the

[GENERAL] count function alternative in postgres

2010-04-03 Thread junaidmalik14
Is there any alternative of mysql function COUNT(DISTINCT expr,[expr...]) in postgres. We get error if we write count like this count(distinct profile.id, profile.name, profile.age) but it works well in mysql. Reference url is given below http://dev.mysql.com/doc/refman/5.1/en/group-by-functi

[GENERAL] count function alternative in postgres

2010-04-03 Thread junaid malik
Is there any alternative of mysql function COUNT(DISTINCT expr, [expr...]) in postgres. We get error if we write count like this count(distinct profile.id, profile.name, profile.age) but it works well in mysql. Reference url is given below http://dev.mysql.com/doc/refman/5.1/en/group-by-function

Re: [GENERAL] Advice on webbased database reporting

2010-04-03 Thread Boszormenyi Zoltan
Hi, Davor J. írta: > I need to make certain views from the database visible online (on our > webpage) and I wonder if there is any reasonably quick solution for this > that works with Postgres? > > At best, a query should be specified and the user should be able to select > the layout on certai

Re: [GENERAL] join two tables without a key

2010-04-03 Thread Andreas Kretschmer
Dino Vliet wrote: > Hi postgresql list, > > > If I have two tables with the same number of rows but different columns and I > want to create one table out of them what would be the way to do that in > postgresql? > > > > > Table A has N number of rows and columns X,Y,Z and Table B has N num

Re: [GENERAL] join two tables without a key

2010-04-03 Thread Raymond O'Donnell
On 03/04/2010 12:32, Dino Vliet wrote: > --- On Sat, 4/3/10, Raymond O'Donnell wrote: > On 03/04/2010 11:16, Dino Vliet wrote: > >> Hi postgresql list, If I have two tables with the same number of rows >> but different columns and I want to create one table out of them what >> would be the way to

Re: [GENERAL] join two tables without a key

2010-04-03 Thread Dino Vliet
--- On Sat, 4/3/10, Raymond O'Donnell wrote: From: Raymond O'Donnell Subject: Re: [GENERAL] join two tables without a key To: "Dino Vliet" Cc: pgsql-general@postgresql.org Date: Saturday, April 3, 2010, 1:01 PM On 03/04/2010 11:16, Dino Vliet wrote: > Hi postgresql list, If I have two tables

Re: [GENERAL] join two tables without a key

2010-04-03 Thread Jeremy Harris
On 04/03/2010 11:16 AM, Dino Vliet wrote: If I have two tables with the same number of rows but different columns and I want to create one table out of them what would be the way to do that in postgresql? Table A has N number of rows and columns X,Y,Z and Table B has N number of rows and P,

Re: [GENERAL] join two tables without a key

2010-04-03 Thread Raymond O'Donnell
On 03/04/2010 11:16, Dino Vliet wrote: > Hi postgresql list, If I have two tables with the same number of rows > but different columns and I want to create one table out of them what > would be the way to do that in postgresql? > > Table A has N number of rows and columns X,Y,Z and Table B has N

[GENERAL] join two tables without a key

2010-04-03 Thread Dino Vliet
Hi postgresql list, If I have two tables with the same number of rows but different columns and I want to create one table out of them what would be the way to do that in postgresql? Table A has N number of rows and columns X,Y,Z and Table B has N number of rows and P,Q,R as columns. None of

Re: [GENERAL] Performance statistics

2010-04-03 Thread Craig Ringer
On 1/04/2010 9:03 PM, Michael Gould wrote: Without asking for any blood letting, I'm wondering if there are any hard statistics available to prove if Windows Server is faster than, slower than or the same as for performance to one of the various Linux distributions. I haven't seen any hard wind