[GENERAL] Exception Handling in C-Language Functions?

2012-12-02 Thread rahul143
I have the created a C-Language function (code is below). Now, I wonder: How do I handle exceptions, for example if malloc cannot assign the necessary memory? Do "palloc" and "pfree" handle such a case cleanly? Should I simply use an "assert"? #include "postgres.h" #include #include #i

Re: [GENERAL] MS-Access and Stored procedures

2012-12-02 Thread rahul143
Hello Mike. I have found your code to be very usefull for me. I combined it with some other codes in order to establich a procedure for startup on client. The problem apers with relinking tables. It seems that Access creates fake indexes automaticcaly whern relinking using your proposed connce

[GENERAL] guids / bytea and index use ?

2012-12-02 Thread rahul143
Hi, We are currently using a 32byte varchar for our primary keys. We tried to reduce this down to 16 bytes but varchar didn’t seem to store this correctly. I’d like to use bytea instead so we could use 16bytes, but are indexes used properly ? Does anyone have any other suggestions on how to store

[GENERAL] Postgres PHP error

2012-12-02 Thread rahul143
Hi All Im receiving the following error, on a php page, conneting to postgres 7.4, installed on Mandrake 10.0 Error Description: pg_connect(): Unable to connect to PostgreSQL server: FATAL: sorry, too many clients already . Can anyone tell me what this means? Is there a performance setting

[GENERAL] Running out of memory while making a join

2012-12-02 Thread rahul143
Hi, The following SQL join command runs the PostgreSQL server out of memory. The server runs on a box with Red Hat Enterprise Linux Server release 6.3 (Santiago) and PostgreSQL 8.3.21. select wm_nfsp from "5611_isarq".wm_nfsp left join "5611_nfarq".nfe on wm_nfsp.tpdoc = 7 where 1 = 1 and wm_nfsp

[GENERAL] Bug in postgres 9.2 installation: pg_archivecleanup: command not found

2012-12-02 Thread rahul143
I have installed postgres 9.2 on ubuntu 12.04 like this: sudo add-apt-repository ppa:pitti/postgresql sudo apt-get update sudo apt-get install postgresql-9.2 However after this, i get the following error: 2012-11-12 17:49:38 GMT WARNING: archive_cleanup_command "pg_archivecleanup /var/lib/postg

[GENERAL] column "tgconstraint" doest not exist

2012-12-02 Thread rahul143
Hi, I am using gpAdmin III 1.160. 0 on Windows, when I click a table node inside the object tree-view, an error occured, An error has occurred: ERROR: column "tgconstraint" does not exist LINE 9: WHERE tgconstraint=0. I am connecting to 4.2.2.4 Greenplum database server. Regards, Xiaobo Gu

[GENERAL] High SYS CPU - need advise

2012-12-02 Thread rahul143
Hello everyone, I'm seeking help in diagnosing / figuring out the issue that we have with our DB server: Under some (relatively non-heavy) load: 300...400 TPS, every 10-30 seconds server drops into high cpu system usage (90%+ SYSTEM across all CPUs - it's pure SYS cpu, i.e. it's not io wait, not

[GENERAL] ERROR: query has no destination for result data

2012-12-02 Thread rahul143
Hello, I wish to return the SELECT statement. Ho can I achieve this? DO $$ DECLARE v_some_id int=14; BEGIN /* more queries here... */ SELECT 'this is text'; END $$ LANGUAGE plpgsql; Best, Peter Kroon - -- View this message in context: http://postgresql.1045698.n5.nabble.com/ERROR-

[GENERAL] Regarding the shared disk fail over cluster configuration

2012-12-02 Thread rahul143
Dear All, I read the postgresql document for clustering. I am planning to go for the shared disk fail over clustering. But I am unable to understand propery how to achieve this. Below is my hardware setup - I have two server - Primary server and secondary server. Both the server RHEL 6 is ins

[GENERAL] [SQL] Calling Functions in RULEs

2012-12-02 Thread rahul143
Hello, I would like to call multiple PL/pgSQL procedures (i.e. functions returning void) from INSERT, UPDATE and DELETE RULEs. Using "SELECT some_procedure();" is a possible way to do that, but it causes a dummy result table to be delivered to the application invoking the INSERT/UPDATE/DELET