[GENERAL] Join efficiency

2009-09-01 Thread tanjunhua
Hello, everybody. In my project, I have a select syntax to get record summary between three tables. one of them is tab_main consist of 46 columns(with 27797 records), another is tab_user consist of 32 columns(with 3 records) and the last one is tab_property consist of 117 columns(with 30541 re

Re: [GENERAL] Join efficiency

2009-09-01 Thread tanjunhua
I'm sorry for my mistake, the postgre version is: test_db=# SELECT version(); version --- PostgreSQL 8.1.8 on i486-pc-linux-gnu, compiled

Re: [GENERAL] No buffer space available

2009-09-01 Thread Narendra Shah
Hi Lennnin, Thanks a lot for providing your kind help. But after tweaking registry, yet problem not solved. On yesterday evening when i check again. Same problem occured, what i have done is i have queried one table. Then after Database again giving me the same error. Requesting you to please pro

Re: [GENERAL] Enum

2009-09-01 Thread John R Pierce
Xai wrote: Is there a query i can use to get the fields of an Enum, just in case someone needs it for the client application. select e.enumlabel from pg_enum as e join pg_type as t on (t.typtype='e' and e.enumtypeid=t.typbasetype) where t.typname = $1 order by e.enumtypid; I think. or

[GENERAL] Enum

2009-09-01 Thread Xai
Is there a query i can use to get the fields of an Enum, just in case someone needs it for the client application. -- 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] how to use multiple schema's

2009-09-01 Thread Scott Marlowe
On Tue, Sep 1, 2009 at 2:58 PM, Himanshu Gupta wrote: > Hi, > > I have multiple applications, i want to create separate schema for each of > the application. I dont want to change search path, since  have only one > user. I went through couple of post's talking about some patch related to > that. I

Re: [GENERAL] No buffer space available

2009-09-01 Thread Lennin Caro
--- On Tue, 9/1/09, Narendra Shah wrote: From: Narendra Shah Subject: Re: [GENERAL] No buffer space available To: pgsql-general@postgresql.org Date: Tuesday, September 1, 2009, 11:53 AM I am using machine which is exceeding more than 100 connection from my application(iview-syslog server) to

Re: [GENERAL] Get closest numbers between intervals

2009-09-01 Thread Dimitri Fontaine
xaviergxf writes: > city_code, start_ip, end_ip > > I´m searching for the city that its between two ip´s. But, i would > like to get the nearest´s cities too. I'd have a look at ip4r rather than having both the start and end ip there. The GiST index on ip4r allow for quick lookup: SELECT * FRO

[GENERAL] how to use multiple schema's

2009-09-01 Thread Himanshu Gupta
Hi, I have multiple applications, i want to create separate schema for each of the application. I dont want to change search path, since have only one user. I went through couple of post's talking about some patch related to that. It seems that patch got rejected. Any help is appreciated

Re: [GENERAL] Any former bugs that loose duplicates after a sort

2009-09-01 Thread Adrian Klaver
- "Richard Broersma" wrote: > The is someone in the MS-Access community that is seeing duplicated > records (differing by a serial id) disappear with sorting the list by > the unique serial id. Were there any older version of Postgres that > did this? > > http://www.utteraccess.com/forums/

[GENERAL] Any former bugs that loose duplicates after a sort

2009-09-01 Thread Richard Broersma
The is someone in the MS-Access community that is seeing duplicated records (differing by a serial id) disappear with sorting the list by the unique serial id. Were there any older version of Postgres that did this? http://www.utteraccess.com/forums/showflat.php?Cat=&Number=1876017&page=0&view=&s

[GENERAL] Get closest numbers between intervals

2009-09-01 Thread xaviergxf
Hi, I have one table that has this structure: city_code, start_ip, end_ip I´m searching for the city that its between two ip´s. But, i would like to get the nearest´s cities too. Any ideas how can i search for the city proximity? thanks! -- Sent via pgsql-general mailing list (pgsql-gener

Re: [GENERAL] pg_ctl with unix domain socket?

2009-09-01 Thread Josef Wolf
On Tue, Sep 01, 2009 at 06:34:21AM -0700, Adrian Klaver wrote: > On Tuesday 01 September 2009 4:28:22 am Josef Wolf wrote: Thanks for your help, Adrian! [ ... ] > > Any hints how to use pg_ctl to start/stop postgresql on a unix domain > > socket? > > 1) In postgresql.conf make listen_addresses e

Re: [GENERAL] Keys and indexes

2009-09-01 Thread Michael Glaesemann
On Sep 1, 2009, at 7:37 , Alexandr Varlamov wrote: Does indexing working for foreignkeys column automaticaly? No. Or i need create index manually. Yes. Michael Glaesemann grzm seespotcode net -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to yo

Re: [GENERAL] pg_ctl with unix domain socket?

2009-09-01 Thread Adrian Klaver
On Tuesday 01 September 2009 4:28:22 am Josef Wolf wrote: > Hello, > > I have created a fresh cluster with > >initdb -D /some/path/pgtest > > I can start postgres to run on unix domain socket serving this cluster > with: > >postgres -D /some/path/pgtest -h '' -k /some/path/pgtest > > But I'

Re: [GENERAL] pg_ctl with unix domain socket?

2009-09-01 Thread Daniel Verite
Josef Wolf wrote: > > PGPORT should be the port number on which the Postgresql server is > > running(5432 is default), and PGDATA=some/path/pgtest . > > Yeah, I see. But I do not want it to bind to network socket. I want it to > bind to a unix domain socket _only_. Typically this is

[GENERAL] Keys and indexes

2009-09-01 Thread Alexandr Varlamov
Does indexing working for foreignkeys column automaticaly? Or i need create index manually. -- 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] Query and the number of row result

2009-09-01 Thread Raymond O'Donnell
On 31/08/2009 18:00, Tim Landscheidt wrote: > Presuming that you are talking about a function written in > PL/pgSQL, you will have to count them yourself or issue a > second query "SELECT COUNT(*) FROM [...]". For the special > case that you want to find out whether no row at all was > found, you

Re: [GENERAL] pg_ctl with unix domain socket?

2009-09-01 Thread Josef Wolf
On Tue, Sep 01, 2009 at 05:28:46PM +0530, Abbas wrote: > On Tue, Sep 1, 2009 at 4:58 PM, Josef Wolf wrote: Thanks for your fast response, Abbas! > > I have created a fresh cluster with > > initdb -D /some/path/pgtest > > PGPORT=/some/path/pgtest pg_ctl -D/some/path/pgtest -l postgreslog star

Re: [GENERAL] pg_ctl with unix domain socket?

2009-09-01 Thread Abbas
On Tue, Sep 1, 2009 at 4:58 PM, Josef Wolf wrote: > Hello, > > I have created a fresh cluster with > > initdb -D /some/path/pgtest > > I can start postgres to run on unix domain socket serving this cluster > with: > > postgres -D /some/path/pgtest -h '' -k /some/path/pgtest > > But I'd like t

Re: [GENERAL] No buffer space available

2009-09-01 Thread Narendra Shah
I am using machine which is exceeding more than 100 connection from my application(iview-syslog server) to postgres. I have updated configuration for postgres in postgres.conf for max connection. But then also it is giving me the error as No buffer space available. And it is happening with only iv

[GENERAL] pg_ctl with unix domain socket?

2009-09-01 Thread Josef Wolf
Hello, I have created a fresh cluster with initdb -D /some/path/pgtest I can start postgres to run on unix domain socket serving this cluster with: postgres -D /some/path/pgtest -h '' -k /some/path/pgtest But I'd like to use pg_ctl instead, in order to have clean control: PGPORT=/som

Re: [GENERAL] Aggregate function with subquery in 8.3 and 8.4.

2009-09-01 Thread Sam Mason
On Tue, Sep 01, 2009 at 10:05:44AM +0100, Sam Mason wrote: > On Mon, Aug 31, 2009 at 04:02:43PM -0700, Sheng Cheng wrote: > > I though the following query would give me the same results in 8.4.0 and > > 8.3.1. > > It should give the same results! This looks like a bug in 8.4 to me I've just noti

Re: [GENERAL] Aggregate function with subquery in 8.3 and 8.4.

2009-09-01 Thread Sam Mason
On Mon, Aug 31, 2009 at 04:02:43PM -0700, Sheng Cheng wrote: > I though the following query would give me the same results in 8.4.0 and > 8.3.1. It should give the same results! This looks like a bug in 8.4 to me, in an attempt to optimize things it's pulling the CASE out from inside the inner se

Re: [GENERAL] Eclipse jdbc postgresql

2009-09-01 Thread Glyn Astill
--- On Tue, 1/9/09, Sheepjxx wrote: > If I want to use postgres with jdbc , > I have already download jdbc, do I need  extra option > for compile postgres?--with-java?do I need change > postgres.conf? > No, you just need the postgres jdbc driver (jdbc.postgresql.org) in your classpath. Glyn

Re: [GENERAL] Connecting to Teradata via Postgresql

2009-09-01 Thread Simon Riggs
On Sun, 2009-08-30 at 23:21 +0800, Ow Mun Heng wrote: > Anyone here has a teradata box ? Are you able to connect to it from withing > postgresql? > > I would like to pull 1or 2 tables from the box (sync) and was wondering if > there's anyway to do that w/o using dbi-link. > > I actually am tryi

Re: [GENERAL] [Skytools-users] WAL Shipping + checkpoint

2009-09-01 Thread Simon Riggs
On Tue, 2009-09-01 at 13:14 +1000, Yaroslav Tykhiy wrote: > Could you detail your solution please, if any? I've seen frozen > pg_controldata output on my standby server for ages and attributed > that to the ancient version of pgsql (8.0.x) I'm stuck with. It won't ever work before 8.2 --