Re: [GENERAL] join between a table and function.

2011-08-18 Thread Lauri Kajan
Thanks for every one for help. I got it to work. The reason i used a function is that it calculates the values/attributes from several tables in a pretty complex way. I tried to do this by a view first but couldn't do it. I think it's impossible. The function is always supposed to return only one

[GENERAL] How to access tables using a superuser

2011-08-18 Thread Siva Palanisamy
Hi All, I have few tables being created using an ordinary user account. When I login into the postgresql using the super-user, I can't access my tables! It says, ERROR: relation tablename does not exist. As I need to perform some operations using super-user, I want the tables to be

Re: [GENERAL] How to access tables using a superuser

2011-08-18 Thread John R Pierce
On 08/17/11 11:58 PM, Siva Palanisamy wrote: Hi All, I have few tables being created using an ordinary user account. When I login into the postgresql using the super-user, I can’t access my tables! It says, ERROR: relation tablename does not exist. As I need to perform some operations

Re: [GENERAL] How to access tables using a superuser

2011-08-18 Thread Siva Palanisamy
Hi John, I logged into the same database. I can say the commands, and you can correct me if I'm wrong. Ordinary User: psql -h localhost -d db -U ordinaryusername Select * from contacts Now, I can access the tables. I also do have the .SQL file where it states the table schema as follows:

Re: [GENERAL] How to access tables using a superuser

2011-08-18 Thread Guillaume Lelarge
On Thu, 2011-08-18 at 12:48 +0530, Siva Palanisamy wrote: Hi John, I logged into the same database. I can say the commands, and you can correct me if I'm wrong. Ordinary User: psql -h localhost -d db -U ordinaryusername Select * from contacts Now, I can access the tables. I also do have

Re: [GENERAL] Failover architecture

2011-08-18 Thread Reuven M. Lerner
Thanks, Tatsuo, and others who commented so helpfully.  It's the best of all worlds when I get confirmation that my feelings were right, *and* I learn a lot of new things that I had never considered, thanks to the generosity of this great community. Reuven

[GENERAL] max_stack_depth error, need suggestion

2011-08-18 Thread AI Rumman
I am using Postgresql 9.0.1 in Centos 5. Yesterday, I got the error inlog: 2011-08-16 10:57:34 EDT [3868]: [1-1] user=vcrm,db=vtigercrm504 ERROR: stack depth limit exceeded 2011-08-16 10:57:34 EDT [3868]: [2-1] user=vcrm,db=vtigercrm504 HINT: Increase the configuration parameter max_stack_depth,

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread Dimitri Fontaine
Chris Travers chris.trav...@gmail.com writes: I want an email to go out to the ordering manager when the quantity I have of an item drops below the re-order point. I also want this email NOT to go out if the transaction rolls back. (Wait, the order of 5 widgets I just processed rolled

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread Dimitri Fontaine
c k shreeseva.learn...@gmail.com writes: Many users are using it and found it stable and scalable. Important is that web server is external to the database and a mod_pgsql like mod_plsql is used to connect web server to database. Each page is considered as a stored procedure in the oracle

Re: [GENERAL] max_stack_depth error, need suggestion

2011-08-18 Thread Leif Biberg Kristensen
On Thursday 18. August 2011 12.39.31 AI Rumman wrote: I am using Postgresql 9.0.1 in Centos 5. Yesterday, I got the error inlog: 2011-08-16 10:57:34 EDT [3868]: [1-1] user=vcrm,db=vtigercrm504 ERROR: stack depth limit exceeded 2011-08-16 10:57:34 EDT [3868]: [2-1]

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread Sim Zacks
On 08/18/2011 07:57 AM, Chris Travers wrote: On Wed, Aug 17, 2011 at 9:38 PM, Sim Zacks s...@compulab.co.il wrote: The point was not whether I have a bug in an external application, the point is that I need an external application which creates more overhead

[GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread Adarsh Sharma
Dear All, I want some views on the below requirements : 1. I have a Postgres DB server with 25 GB database. It has more than 110 tables. I am using Postgresql 8.3 on a CentOs. 2. I have another system laptop that contains the same database but it is for testing purposes. What I want ?

Re: [GENERAL] idle in transaction process

2011-08-18 Thread tamanna madaan
Hi Yes , restarting the slon resolves the issue. But. there are other processes also in my application which connect to postgres . Those processes can also cause idle in transaction postgres connection . So, I was wondering if I can make use of tcp_keepalives_idle , tcp_keepalives_interval and

Re: [GENERAL] max_stack_depth error, need suggestion

2011-08-18 Thread Nicholson, Brad (Toronto, ON, CA)
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Leif Biberg Kristensen Sent: Thursday, August 18, 2011 6:49 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] max_stack_depth error, need suggestion On

[GENERAL] Can we use dblink for insert and update of dynamic values

2011-08-18 Thread Jenish Vyas
Hi All, Can we user dblink for insert and update of dynamic values?? Sample function : CREATE OR REPLACE FUNCTION dblink_test() RETURNS boolean AS $BODY$ DECLARE v1 numeric; v2 character varying(50); BEGIN v1 := 123; v2 := 'asdasdasd'; select dblink_exec('dbname=testing_db_link_1'::text,

Re: [GENERAL] Can we use dblink for insert and update of dynamic values

2011-08-18 Thread Ireneusz Pluta
W dniu 2011-08-18 16:26, Jenish Vyas pisze: Hi All, Can we user dblink for insert and update of dynamic values?? Sample function : CREATE OR REPLACE FUNCTION dblink_test() RETURNS boolean AS $BODY$ DECLARE v1 numeric; v2 character varying(50); BEGIN v1 := 123; v2 := 'asdasdasd';

[GENERAL] Pgadmin plugins

2011-08-18 Thread salah jubeh
Hello, I find  pgadmin  a nice software,  but I think it lacks some fundamental functionalities mainly  repositories support including git and cvs. Also, some enhancement on the editor would be nice such as auto completion, code ordering, coloring, etc. I have seen that pgadmin have a menu

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread Chris Travers
On Thu, Aug 18, 2011 at 3:40 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Chris Travers chris.trav...@gmail.com writes: I want an email to go out to the ordering manager when the quantity I have of an item drops below the re-order point.  I also want this email NOT to go out if the

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread Merlin Moncure
On Thu, Aug 18, 2011 at 5:48 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: c k shreeseva.learn...@gmail.com writes: Many users are using it and found it stable and scalable. Important is that web server is external to the database and a mod_pgsql like mod_plsql is used to connect web

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread s...@bestmx.ru
Merlin Moncure пишет: On Thu, Aug 18, 2011 at 5:48 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: c kshreeseva.learn...@gmail.com writes: Many users are using it and found it stable and scalable. Important is that web server is external to the database and a mod_pgsql like mod_plsql is

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread Dmitriy Igrishin
2011/8/18 s...@bestmx.ru s...@bestmx.ru Merlin Moncure пишет: On Thu, Aug 18, 2011 at 5:48 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: c kshreeseva.learn...@gmail.com** writes: Many users are using it and found it stable and scalable. Important is that web server is external

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread s...@bestmx.ru
Dmitriy Igrishin пишет: 2011/8/18 s...@bestmx.ru mailto:s...@bestmx.ru s...@bestmx.ru mailto:s...@bestmx.ru Merlin Moncure пишет: On Thu, Aug 18, 2011 at 5:48 AM, Dimitri Fontaine dimi...@2ndquadrant.fr mailto:dimi...@2ndquadrant.fr wrote: c

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread Dmitriy Igrishin
2011/8/18 s...@bestmx.ru s...@bestmx.ru Dmitriy Igrishin пишет: 2011/8/18 s...@bestmx.ru mailto:s...@bestmx.ru s...@bestmx.ru mailto: s...@bestmx.ru Merlin Moncure пишет: On Thu, Aug 18, 2011 at 5:48 AM, Dimitri Fontaine dimi...@2ndquadrant.fr

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread s...@bestmx.ru
Dmitriy Igrishin пишет: 2011/8/18 s...@bestmx.ru mailto:s...@bestmx.ru s...@bestmx.ru mailto:s...@bestmx.ru Dmitriy Igrishin пишет: 2011/8/18 s...@bestmx.ru mailto:s...@bestmx.ru mailto:s...@bestmx.ru mailto:s...@bestmx.ru s...@bestmx.ru mailto:s...@bestmx.ru

[GENERAL] Suspicious Bill

2011-08-18 Thread shreeseva.it
Hi ,I just signed a petition asking Prime Minister Manmohan Singh to stop the Biotechnology Regulatory Authority of India (BRAI) Bill from being passed. This bill will create a body which will single-handedly clear all genetically modified (GM) crops. Public opposition made the Karnataka

Re: [GENERAL] altering foreign key without a table scan

2011-08-18 Thread Jerry Sievers
Vincent de Phily vincent.deph...@mobile-devices.fr writes: Hi list, as part of a db schema update, I'd like to alter the on update property of a fkey, for example going from : ALTER TABLE ONLY foo ADD CONSTRAINT foo_barid_fkey FOREIGN KEY (barid) REFERENCES bar(id) ON UPDATE CASCADE ON

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread Chris Travers
On Thu, Aug 18, 2011 at 4:32 AM, Sim Zacks s...@compulab.co.il wrote: There are many differences. 1) If I have a database function and I copy my database to another server, the function still works. If I have an external daemon application, I not only have to copy my database, I also have to

Re: [GENERAL] Suspicious Bill

2011-08-18 Thread Scott Ribe
Mods: FYI, this is not a one-off thing. I've seen this email on 4 other lists so far this morning. So some turd is spamming every list he can subscribe to. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-general mailing list

[GENERAL] call initdb as regular user

2011-08-18 Thread alexondi
Hi! Can I call initdb with some params as regular user (not root or postgres)? May I have some problem with replication, backup or with some other subsystem? Thank you! -- View this message in context: http://postgresql.1045698.n5.nabble.com/call-initdb-as-regular-user-tp4712980p4712980.html

Re: [GENERAL] call initdb as regular user

2011-08-18 Thread Rodrigo Gonzalez
On 08/18/2011 03:20 PM, alexondi wrote: Hi! Can I call initdb with some params as regular user (not root or postgres)? postgres is a normal userso no problem at all. initdb cannot be run as root May I have some problem with replication, backup or with some other subsystem? Thank you! --

Re: [GENERAL] call initdb as regular user

2011-08-18 Thread Peter Eisentraut
On tor, 2011-08-18 at 11:20 -0700, alexondi wrote: Can I call initdb with some params as regular user (not root or postgres)? Sure. -- 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] call initdb as regular user

2011-08-18 Thread John Cheng
Sure you can. The initdb command just sets up the directory you specified and that's all it does. The files in the directory will be created with that user's permission. So the directory you specify must be accessible to that regular user. man page - http://linux.die.net/man/1/initdb Creating a

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread Ben Chobot
On Aug 18, 2011, at 5:36 AM, Adarsh Sharma wrote: Dear All, I want some views on the below requirements : 1. I have a Postgres DB server with 25 GB database. It has more than 110 tables. I am using Postgresql 8.3 on a CentOs. 2. I have another system laptop that contains the same

Re: [GENERAL] call initdb as regular user

2011-08-18 Thread alexondi
I have some single-purpose system and user can interact only with special software (on computer would start only this software{daemon and gui}, postgresql and other system daemons). And I don't wont change user when I call psql, pg_ctl, rsync and other stuff. -- View this message in context:

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread Dmitriy Igrishin
2011/8/18 s...@bestmx.ru s...@bestmx.ru Dmitriy Igrishin пишет: 2011/8/18 s...@bestmx.ru mailto:s...@bestmx.ru s...@bestmx.ru mailto: s...@bestmx.ru Dmitriy Igrishin пишет: 2011/8/18 s...@bestmx.ru mailto:s...@bestmx.ru mailto:s...@bestmx.ru mailto:s...@bestmx.ru

[GENERAL] Dump a database excluding one table DATA?

2011-08-18 Thread Dmitry Koterov
Hello. Is there any way (or hack) to dump the whole database, but to exclude the DATA from a table within this dump? (DDL of the table should not be excluded: after restoring the data the excluded table should look empty.) I see -T switch of pg_dump, but seems -T excludes the data AND the DDL of

Re: [GENERAL] call initdb as regular user

2011-08-18 Thread John Cheng
On Thu, Aug 18, 2011 at 11:59 AM, alexondi alexo...@rambler.ru wrote: I have some single-purpose system and user can interact only with special software (on computer would start only this software{daemon and gui}, postgresql and  other system daemons). And I don't wont change user when I call

Re: [GENERAL] Dump a database excluding one table DATA?

2011-08-18 Thread Adrian Klaver
On Thursday, August 18, 2011 12:49:45 pm Dmitry Koterov wrote: Hello. Is there any way (or hack) to dump the whole database, but to exclude the DATA from a table within this dump? (DDL of the table should not be excluded: after restoring the data the excluded table should look empty.) I

Re: [GENERAL] Dump a database excluding one table DATA?

2011-08-18 Thread Dmitry Koterov
1. I need to shorten pg_dump results (for backup purposes), so pg_restore is too late for that... 2. If I use pg_dump -s separately, the data may not load (or load to slow) after that, because all indices/foreign keys are already there. Is there a way to split pg_dump -s into 2 parts: the first

[GENERAL] Retrieve number of rows from COPY command inside a plpgsql function

2011-08-18 Thread Erwin Brandstetter
Aloha! I am trying to retrieve the number of rows copied by a COPY command inside a plpgsql function. The docs tell me, that the command tag holds this information. But how to access the command tag from within a plpgsql function? http://www.postgresql.org/docs/9.0/interactive/sql-copy.html I

Re: [GENERAL] Dump a database excluding one table DATA?

2011-08-18 Thread Adrian Klaver
On Thursday, August 18, 2011 1:23:25 pm Dmitry Koterov wrote: 1. I need to shorten pg_dump results (for backup purposes), so pg_restore is too late for that.. 2. If I use pg_dump -s separately, the data may not load (or load to slow) after that, because all indices/foreign keys are already

Re: [GENERAL] Dump a database excluding one table DATA?

2011-08-18 Thread Dmitry Koterov
Thanks, pg_dump --data-only --disable-triggers is the king. (Unfortunately it is not supported by pg_dumpall, but it is entirely another story. :-) On Fri, Aug 19, 2011 at 12:36 AM, Adrian Klaver adrian.kla...@gmail.comwrote: On Thursday, August 18, 2011 1:23:25 pm Dmitry Koterov wrote: 1.

Re: [GENERAL] Pgadmin plugins

2011-08-18 Thread Guillaume Lelarge
On Thu, 2011-08-18 at 08:22 -0700, salah jubeh wrote: Hello, I find pgadmin a nice software, but I think it lacks some fundamental functionalities mainly repositories support including git and cvs. I also do think pgAdmin lacks some nice features, but repository support, I don't even

[GENERAL] Problem creating GIN index on multiple weighted columns

2011-08-18 Thread Ryan Fugger
I'm using 8.4.8, attempting to run the following command: = create index profile_search_index on profile_profile using gin(setweight(to_tsvector('english', name), 'A') || setweight(to_tsvector('english', description), 'B')); I get this error: ERROR: syntax error at or near || LINE 1: ...

Re: [GENERAL] Suspicious Bill

2011-08-18 Thread John R Pierce
On 08/18/11 10:16 AM, Scott Ribe wrote: Mods: FYI, this is not a one-off thing. I've seen this email on 4 other lists so far this morning. So some turd is spamming every list he can subscribe to. my guess is, he handed access to his address book over to the organization running that

Re: [GENERAL] Problem creating GIN index on multiple weighted columns

2011-08-18 Thread Tom Lane
Ryan Fugger a...@ryanfugger.com writes: I'm using 8.4.8, attempting to run the following command: = create index profile_search_index on profile_profile using gin(setweight(to_tsvector('english', name), 'A') || setweight(to_tsvector('english', description), 'B')); I get this error: ERROR:

[GENERAL] Problem with 8.3.14 Windows binaries

2011-08-18 Thread Pete Wall
Hello, I am upgrading the version of PostgreSQL used in our product from 8.3.9 to 8.3.15 to close some of the vulnerabilities. After upgrading, I found that it wouldn't work on our Windows 2003 boxes, but it was fine on the 2008 ones. I downloaded every binary release from ..9 to ..15 (from

Re: [GENERAL] Pgadmin plugins

2011-08-18 Thread salah jubeh
Hello, I need repository plug in in order to control my DDL, currently I am using text files to create sachems, procedures , etc.  and it will be great if I can keep track of how the schema changes and even to protect against errors such as accidental file deletion.  Regarding code ordering

Re: [GENERAL] Dump a database excluding one table DATA?

2011-08-18 Thread Dmitry Koterov
Mmm, --disable-triggers is not surely enough - we also have RULEs and (much worse) INDEXes. If we create all indices and then restore all data, it is MUCH SLOWER than restore the data first and then - create all indices. So I think that there is no work-around really... I propose to include an

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread Adarsh Sharma
Ben Chobot wrote: On Aug 18, 2011, at 5:36 AM, Adarsh Sharma wrote: Dear All, I want some views on the below requirements : 1. I have a Postgres DB server with 25 GB database. It has more than 110 tables. I am using Postgresql 8.3 on a CentOs. 2. I have another system laptop that

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread John R Pierce
On 08/18/11 9:03 PM, Adarsh Sharma wrote: I want a simple technique through which I update my production server easily. what if there's been data changes on the production server and different changes on the demo laptop? how do you plan on reconciling those differences? -- john r pierce

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread Adarsh Sharma
Hi Michael, I think you misunderstood my problem. I have a demo system and the data is inserted in this system. Simply I want this newly inserted data to be synk to my production server. Taking pg_dump of cumbersome daily. I reserached find some proprietary solution but I think there may be

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread c k
You can use Talend or Navicat for syncing the data as per your needs without much complexity in writing a data sync application. You have to purchase license for navicat but you can talend for free and it also supports many other database systems. Chaitanya Kulkarni On Fri, Aug 19, 2011 at 10:18

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread Adarsh Sharma
I used Navicat free version many times. As you rightly said, we have to purchase license for Data Synchroniztion.Also , I cannot able to find Talend for Linux. Is it works only for Windows. I find one component Talend MDM for linux. Can it satisfy my requirements ? Thanks c k wrote: You