Re: [GENERAL] Many-to-many problem

2010-03-18 Thread Grant Allen
Hi Raymond, From a strictly relational viewpoint, this is as easy as (select users.uid, apps.appcode from apps, users) except (select canaccess.uid, canaccess.appcode from canaccess) In english, that's the cartesian product of all users' uid and apps appcode minus the known set of user+app a

Re: [GENERAL] building a c function

2010-03-18 Thread Stuart McGraw
On 03/17/2010 01:56 PM, Carsten Kropf wrote: > I think, what you probably want to do is something like that: > MODULE_big = my_funcs > OBJS = myfunc.o mysubs.o > PG_CONFIG=/usr/local/pgsql/bin/pg_config > PGXS := $(shell $(PG_CONFIG) --pgxs) > include $(PGXS) > > Then you will get a shared library

[GENERAL] AIX postgresql error

2010-03-18 Thread Vikram Patil
Hello Guys, On AIX while starting postgresql server I got this error . But server starts up without any issues. LOG: could not bind IPv6 socket: Address already in use HINT: Is another postmaster already running on port 8432? If not, wait a few seconds and retry. Could you plea

Re: [GENERAL] Many-to-many problem

2010-03-18 Thread Joe Conway
On 03/18/2010 03:50 PM, Raymond O'Donnell wrote: > > I can do it easily enough for one user; my problem is doing it for all > users in one fell swoop. > > I'm sure this is a very common problem, but I just can't see the > solution, so any pointers would be greatly appreciated. Is this what you w

[GENERAL] Many-to-many problem

2010-03-18 Thread Raymond O'Donnell
G'night all, I'm being driven nuts by an SQL problem which I think ought to be simple, but I can't see the answer. I have two tables related many-to-many via a third - they describe a set of users, a set of applications and which users have been granted access to which applications. What I want i

Re: [GENERAL] database connections and presenting data on the web

2010-03-18 Thread John R Pierce
Yeb Havinga wrote: 3. Like 1 but with the use of a connection pooler like pgpool. Not sure if pgpool supports asynchronous queries, but that would help as well by pulling data from the 13 databases in parallel instead of serial: get the queries onto the 13 servers without waiting for results,

[GENERAL] Error de postgres con lenguaje C

2010-03-18 Thread Juan Nunez
Buenas Tardes, estoy queriendo hacer correr un sistema realizado en Lenguaje C, con base de datos postgres y cuando lo compilo con el Makefile me tira este error: /usr/bin/ld: cannot find -lpq Estoy utilizando como Sistema Operativo Linux Centos y postgres 8.4.1, ya le di un yum install libpq y c

Re: [GENERAL] Who is locking me?

2010-03-18 Thread Tim Bruce - Postgres
On Thu, March 18, 2010 12:29, Bill Moran wrote: > In response to "Abraham, Danny" : > >> Hi, >> >> >> >> A process hangs forever. >> >> When using this query... >> >> >> >> SELECT pg_stat_get_backend_pid(s.backendid) AS procpid, >> >>pg_stat_get_backend_activity(s.backendid) AS current_que

Re: [GENERAL] accounting package

2010-03-18 Thread Ovnicraft
2010/3/18 Garry Saddington > Does anyone know of a web based accounting(finance) package that uses > Postgresql as a backend? > Thanks Garry > OpenERP > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.or

Re: [GENERAL] Who is locking me?

2010-03-18 Thread Tom Lane
Bill Moran writes: > In response to "Abraham, Danny" : >> - Can I retrieve the Client PID somewhere (then by process name I will dive >> into the code). > If you're on a POSIX system, you can use netstat to find out the details of > the socket the backend is connected to. Looking at all the col

[GENERAL]

2010-03-18 Thread Justin Graf
On 3/18/2010 12:52 PM, Scott Mead wrote: > xtuple ERP does and the latest version of GNUCash can use postgres as a backend too. > > --Scott M > > On Thu, Mar 18, 2010 at 1:11 PM, Garry Saddington < ga...@schoolteachers.co.uk> wrote: > > Does anyone know of a web based accounting(finance) pa

Re: [GENERAL] Who is locking me?

2010-03-18 Thread Bill Moran
In response to "Abraham, Danny" : > Hi, > > > > A process hangs forever. > > When using this query... > > > > SELECT pg_stat_get_backend_pid(s.backendid) AS procpid, > >pg_stat_get_backend_activity(s.backendid) AS current_query > > FROM (SELECT pg_stat_get_backend_idset() AS b

[GENERAL] Who is locking me?

2010-03-18 Thread Abraham, Danny
Hi, A process hangs forever. When using this query... SELECT pg_stat_get_backend_pid(s.backendid) AS procpid, pg_stat_get_backend_activity(s.backendid) AS current_query FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS s where pg_stat_get_backend_activity(s.backendid) n

Re: [GENERAL] accounting package

2010-03-18 Thread Roderick A. Anderson
Garry Saddington wrote: Does anyone know of a web based accounting(finance) package that uses Postgresql as a backend? LedgerSMB Rod -- Thanks Garry -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] accounting package

2010-03-18 Thread Scott Mead
xtuple ERP does and the latest version of GNUCash can use postgres as a backend too. --Scott M On Thu, Mar 18, 2010 at 1:11 PM, Garry Saddington < ga...@schoolteachers.co.uk> wrote: > Does anyone know of a web based accounting(finance) package that uses > Postgresql as a backend? > Thanks Ga

[GENERAL] accounting package

2010-03-18 Thread Garry Saddington
Does anyone know of a web based accounting(finance) package that uses Postgresql as a backend? Thanks Garry -- 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] database connections and presenting data on the web

2010-03-18 Thread Geoffrey
Craig Ringer wrote: On 18/03/2010 9:19 PM, Geoffrey wrote: We are trying to determine the best solution for a web based application. We have 13 databases (separate postmaster for each database) that we need to retrieve data from in order to produce the web page. This data is changing on a regula

Re: [GENERAL] definitions of regexp functions required

2010-03-18 Thread Craig Ringer
On 18/03/2010 8:13 PM, Ehsan Haq wrote: Hi, I am using a relatively older version of Postgres What version exactly? and I need to use the following functions. regexp_matches(), |regexp_split_to_array()|, and |regexp_split_to_table()| . Can anybody provide me the definitions of these functions

Re: [GENERAL] tables getting bloated

2010-03-18 Thread Craig Ringer
On 18/03/2010 9:48 PM, akp geek wrote: I have job that does the vacuum full every day for those 2 tables and also for the database. By the end of the day, the get bloated. http://wiki.postgresql.org/wiki/Introduction_to_VACUUM%2C_ANALYZE%2C_EXPLAIN%2C_and_COUNT http://wiki.postgresql.org/wiki/

Re: [GENERAL] database connections and presenting data on the web

2010-03-18 Thread Craig Ringer
On 18/03/2010 9:19 PM, Geoffrey wrote: We are trying to determine the best solution for a web based application. We have 13 databases (separate postmaster for each database) that we need to retrieve data from in order to produce the web page. This data is changing on a regular basis. A quick as

Re: [GENERAL] definitions of regexp functions required

2010-03-18 Thread Albe Laurenz
Ehsan Haq wrote: >I am using a relatively older version of Postgres and I > need to use the following functions. > regexp_matches(), regexp_split_to_array(), and > regexp_split_to_table() . Can anybody provide me the > definitions of these functions. Do you mean the implementation? That's h

Re: [GENERAL] tables getting bloated

2010-03-18 Thread Vick Khera
2010/3/18 akp geek : > I have job that does the vacuum full every day for those 2 tables and also > for the database. By the end of the day, the get bloated. Do not run vacuum full. Run vacuum. For these two tables, run vacuum more often, as you clearly are updating it very frequently. You may

Re: [GENERAL] compile a program witn libpq64 (error LIBCMT.Lib...)

2010-03-18 Thread Ashesh Vashi
Try to use libpqdll.lib instead of libpq.lib. -- Ashesh Vashi EnterpriseDB INDIA: Enterprise Postgres Company On Thu, Mar 18, 2010 at 7:30 PM, elekis wrote: > hi all, > > > I try to create a dll that use postgres > > in 32 bit, there is no problem, but in 64 , I h

[GENERAL] compile a program witn libpq64 (error LIBCMT.Lib...)

2010-03-18 Thread elekis
hi all, I try to create a dll that use postgres in 32 bit, there is no problem, but in 64 , I have errors cl /W3 /LDd runtime\rcqpgsql.obj runtime\pgsql_function_utility.obj runtime\rc qsql.obj C:\yafl\CT\bignum.obj C:\yafl\CT\CT_convert.obj runtime\error.obj runti me\profiler.obj runtime\rc

Re: [GENERAL] tables getting bloated

2010-03-18 Thread akp geek
I have job that does the vacuum full every day for those 2 tables and also for the database. By the end of the day, the get bloated. Regards 2010/3/18 Devrim GÜNDÜZ > On Thu, 2010-03-18 at 09:35 -0400, akp geek wrote: > > I have been doing vacuum full on the database. A > > Why? VF does not h

Re: [GENERAL] tables getting bloated

2010-03-18 Thread Devrim GÜNDÜZ
On Thu, 2010-03-18 at 09:35 -0400, akp geek wrote: > I have been doing vacuum full on the database. A Why? VF does not help you to get rid of bloat -- actually it will create more bloat. -- Devrim GÜNDÜZ PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http

[GENERAL] tables getting bloated

2010-03-18 Thread akp geek
Hi All - I have been doing vacuum full on the database. Also I do vacuum these 2 tables. But there are 2 tables they are getting bloated like any thing. Just only 2 tables. Can you please suggest that I can do to tackle the issue. Appreciate your help Regards

Re: [GENERAL] database connections and presenting data on the web

2010-03-18 Thread Yeb Havinga
Geoffrey wrote: We are trying to determine the best solution for a web based application. We have 13 databases (separate postmaster for each database) that we need to retrieve data from in order to produce the web page. This data is changing on a regular basis. Question is: 1. Do we: f

[GENERAL] database connections and presenting data on the web

2010-03-18 Thread Geoffrey
We are trying to determine the best solution for a web based application. We have 13 databases (separate postmaster for each database) that we need to retrieve data from in order to produce the web page. This data is changing on a regular basis. Question is: 1. Do we: for database in 1-

[GENERAL] definitions of regexp functions required

2010-03-18 Thread Ehsan Haq
Hi,    I am using a relatively older version of Postgres and I need to use the following functions. regexp_matches(), regexp_split_to_array(), and regexp_split_to_table() . Can anybody provide me the definitions of these functions.   Thanks in advance Ehsan