Re: [GENERAL] Revoke "drop database" even for superusers?

2012-12-02 Thread Guillaume Lelarge
On Sun, 2012-12-02 at 10:32 +0530, Pavan Deolasee wrote: > On Sun, Dec 2, 2012 at 7:53 AM, Edson Richter wrote: > > > Em 01/12/2012 22:22, Chris Angelico escreveu: > > > > On Sun, Dec 2, 2012 at 10:20 AM, Edson Richter > >> wrote: > >> > >>> I've put both files in ~/deny_drop folder, and execute

Re: [GENERAL] Revoke "drop database" even for superusers?

2012-12-02 Thread Edson Richter
Em 02/12/2012 07:53, Guillaume Lelarge escreveu: On Sun, 2012-12-02 at 10:32 +0530, Pavan Deolasee wrote: On Sun, Dec 2, 2012 at 7:53 AM, Edson Richter wrote: Em 01/12/2012 22:22, Chris Angelico escreveu: On Sun, Dec 2, 2012 at 10:20 AM, Edson Richter wrote: I've put both files in ~/den

Re: [GENERAL] Revoke "drop database" even for superusers?

2012-12-02 Thread Guillaume Lelarge
On Sun, 2012-12-02 at 08:09 -0200, Edson Richter wrote: > Em 02/12/2012 07:53, Guillaume Lelarge escreveu: > > On Sun, 2012-12-02 at 10:32 +0530, Pavan Deolasee wrote: > >> On Sun, Dec 2, 2012 at 7:53 AM, Edson Richter > >> wrote: > >> > >>> Em 01/12/2012 22:22, Chris Angelico escreveu: > >>> > >>

Re: [GENERAL] difference in query performance due to the inclusion of a polygon geometry field

2012-12-02 Thread ivan marchesini
Hi Tom, many thanks for your answer, Il giorno ven, 30/11/2012 alle 10.51 -0500, Tom Lane ha scritto: > (1) time to fetch the wide geometry values from the table's TOAST table Yes.. this could be the point! In fact I do not face problems when a execute a select using similar tables (also lar

Re: [GENERAL] alter sequence

2012-12-02 Thread Jasen Betts
On 2012-11-24, Peter Kroon wrote: > --f46d04389321c8f47d04cf3c0f32 > Content-Type: text/plain; charset=ISO-8859-1 > > ALTER SEQUENCE (select pg_get_serial_sequence('table', 'id')) RESTART WITH > 1; > The query fails: > ALTER SEQUENCE (select pg_get_serial_sequence('table... > it's because of the

Re: [GENERAL] alter sequence

2012-12-02 Thread Guillaume Lelarge
On Sun, 2012-12-02 at 11:42 +, Jasen Betts wrote: > On 2012-11-24, Peter Kroon wrote: > > --f46d04389321c8f47d04cf3c0f32 > > Content-Type: text/plain; charset=ISO-8859-1 > > > > ALTER SEQUENCE (select pg_get_serial_sequence('table', 'id')) RESTART WITH > > 1; > > > The query fails: > > ALTER

Re: [GENERAL] Updateable VIEWS and the manual

2012-12-02 Thread Tom Lane
Thomas Kellerer writes: > I just noticed the following statement in the CREATE VIEW documentation (9.2 > and 9.1): > Currently, views are read only: the system will not allow an insert, > update, or delete on a view. You can get the effect of an updatable view > by > creating rul

[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] function

2012-12-02 Thread AZL .
write a select query and take each row values and do some update or insert task postgresql 9.1, can any one give a template of function syntax for implementing such a task -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.p

[GENERAL] excluding terms from stemming in full text search?

2012-12-02 Thread Jeremy Ashcraft
anyone know of a way to override stemming of particular words in the full text searching? Example: 'organic' and 'organization' both stem to 'organ'. If i'm searching for 'organic' I don't want a bunch of results that contain 'organization' and 'organized'. TIA -- *jeremy ashcraft* //

MODERATOR WARNING Re: [GENERAL] Exception Handling in C-Language Functions?

2012-12-02 Thread Alvaro Herrera
MODERATOR WARNING I noticed that this guy Rahul seems to be reinjecting old list emails somehow. Please don't approve anything coming from him. Observe this example: http://postgresql.1045698.n5.nabble.com/Re-GENERAL-MS-Access-and-Stored-procedures-td1843848.html http://postgresql.1045698.n5.na

Re: [GENERAL] excluding terms from stemming in full text search?

2012-12-02 Thread John R Pierce
On 11/27/2012 5:16 PM, Jeremy Ashcraft wrote: anyone know of a way to override stemming of particular words in the full text searching? Example: 'organic' and 'organization' both stem to 'organ'. If i'm searching for 'organic' I don't want a bunch of results that contain 'organization' and 'o

[GENERAL] Database schema

2012-12-02 Thread Dhiraj Gupta
 Hi All, I have created a database name '"ofbiz". then the default schema name "public " created automatically. I want to create schema name ofbiz in the database "ofbiz"  when I create database name "ofbiz" then the schema name "ofbiz" will create automatically. how it is possible if yes, Tha

[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] When is archive_cleanup called?

2012-12-02 Thread François Beausoleil
Hello list! I'm using 9.1.5 on Ubuntu 11.10, in a streaming replication scenario. On my slave, recovery.conf states: standby_mode = on restore_command = '/usr/local/omnipitr/bin/omnipitr-restore -D /var/lib/postgresql/9.1/main/ --source gzip=/data/dbanalytics-wal/ --remove-unneeded --temp-dir

[GENERAL] SETOF come ritorno delle funzioni

2012-12-02 Thread Piviul
Ciao a tutti, avrei bisogno di creare una funzione che restituisca un insieme di record. Ho visto che è possibile fare restituire ad una funzione una tabella di cui si definiscono i campi all'interno della funzione stessa CREATE FUNCTION foo() RETURNS TABLE(id INT, foo TEXT) Poi nel corpo provo a

[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

Re: [GENERAL] Database schema

2012-12-02 Thread Karsten Hilbert
> I have created a database name '"ofbiz". then the default schema name > "public " created automatically. I want to create schema name ofbiz in the > database "ofbiz" >  when I create database name "ofbiz" then the schema name "ofbiz" will > create automatically. > how it is possible if yes, Pre

Re: [GENERAL] SETOF come ritorno delle funzioni

2012-12-02 Thread Pavel Stehule
Hello sorry, a used language in this mailing list is English language 2012/11/30 Piviul : > Ciao a tutti, avrei bisogno di creare una funzione che restituisca un > insieme di record. Ho visto che è possibile fare restituire ad una > funzione una tabella di cui si definiscono i campi all'interno d