Re: [ADMIN] deadlock detected during insert

2003-03-07 Thread A.Bhuvaneswaran
> > Can you able to give some test cases? Here i have tried, but unable to > > detect deadlock. > > Not a complete or tested example, but: > create table a (a int primary key); > create table b ( b int references a); > insert into a values (1); > insert into a values (2); > Transaction 1: begin;

Re: [ADMIN] deadlock detected during insert

2003-03-06 Thread A.Bhuvaneswaran
> If you're using foreign keys on the table that you're inserting into it's > possible that it's waiting on another transaction doing an insert to the > same key or on a change to the referenced table. Can you able to give some test cases? Here i have tried, but unable to detect deadlock. BTW

Re: [ADMIN] displaying rules

2003-03-05 Thread A.Bhuvaneswaran
> Hello, > > is there a way to display created rules in psql environment? > > Regards > Nat No \d option. But can get it from pg_rules system view. It contains the definition as well. regards, bhuvaneswaran ---(end of broadcast)--- TIP 5: Have y

Re: [ADMIN] How to compile contribs ...

2003-03-13 Thread A.Bhuvaneswaran
> Could anybody help on how to compile the contribs? > > I've to copy them anywhere? > How I do it? > The README in corresponding contrib module must be of much help. If not, get back with the name of contrib module which you have tried. regards, bhuvaneswaran ---(end

Re: [ADMIN] Vacuumdb

2003-04-02 Thread A.Bhuvaneswaran
> I'm using PostgreSQL 7.0.3. > I'm doing vacuumdb in my database every night to repair it. But now I have a > problem. I'm looking in /var/lib/pgsql/data/base/ for the tables length and > the primary keys of the tables are not cleaned and is increasing evey day. > What can I do to clean it? > Than

[ADMIN] 7.2.3 -> 7.3.2: timeofday(), server crashed

2003-04-03 Thread A.Bhuvaneswaran
Hi, In the first place, do we have any document which list the points to be considered while upgrading to 7.3.2, other than HISTORY and http://www.ca.postgresql.org/docs/momjian/upgrade_tips_7.3 ? Since in 7.3.2 the default timestamp is without timezone, the below command fails: # CREATE TABLE

Re: [ADMIN] ALTER TABLE

2003-06-05 Thread A.Bhuvaneswaran
> work=# ALTER TABLE rdu ADD CONSTRAINT rdu_finish_time CHECK ((start_time <= > finish_time) OR finish_time IS NULL); > ERROR: AlterTableAddConstraint: rejected due to CHECK constraint > rdu_finish_time I can say that the field, finish_time have the values which conflict with the check constrai

Re: [ADMIN] Timestamp of insertion of the row.

2003-06-11 Thread A.Bhuvaneswaran
> Hi, > Is there any way to know data & time when the row is inserted into a > table? Add a timestamp field and set the default value as now(). If you wish to maintain similar value during update, a before trigger could help. regards, bhuvaneswaran ---(end of broadcast)-

Re: [ADMIN] Add user on old database with password

2003-06-13 Thread A.Bhuvaneswaran
> 1) create one user with password and all Grant on Database. it is a admin > user The below steps would help: $ su - postgres $ createuser your_user Shall the new user be allowed to create databases? (y/n) y Shall the new user be allowed to create more new users? (y/n) y CREATE USER Use GRANT

Re: [ADMIN] Can the frontend get notifications from the postgres

2003-06-16 Thread A.Bhuvaneswaran
> yes. > simply execute LISTEN ; on the one side and then > an NOTIFY on the other side. on the next query > you'll see the notify. (you can easily try it w/ pgsql) > > but i currently dont know, if you can receive notifies in php ... > that's what i'm really interested in ... LISTEN/NOTIFY i

Re: [ADMIN] Can the frontend get notifications from the postgres

2003-06-17 Thread A.Bhuvaneswaran
> > LISTEN/NOTIFY is yet another SQL. We can write a rule on an event and let > > it notify. On the other hand, we can have a while(1) process which keeps > > listening for that notification ie.. event. Once the event is occured, the > > listening process would be notified. The listening process

Re: [ADMIN] Adding PL/Perl

2003-07-17 Thread A.Bhuvaneswaran
> > ERROR: stat failed on file '$libdir/plperl': No such file or directory > createlang: language installation failed Locate the file plperl.so and create the language with appropriate -L option. Moreover, it may be solved by re-compiling. Before re-compling instead of blindly giving --with-per

Re: [ADMIN] Using the /var/lib/pgsql/data directory in the absense

2003-07-24 Thread A.Bhuvaneswaran
> Whatever version of postgresql you WERE running is the same version you > now need to BE running. I.e. if you were running 7.3.x, you should > download 7.3.3 (or 7.3.4 if it's ready to go yet) and use THAT to get your > database up and running. Postgresql won't run databases from different

Re: [ADMIN] Export to file

2003-09-10 Thread A.Bhuvaneswaran
psql=> \o filename.txt psql=> select query; psql=> \o regards, bhuvaneswaran On Tue, 9 Sep 2003, Marvin wrote: > Hi, > There is a way to export the result > of a query into an external DBF or TXT table? > > Thank you, > > > MAGO ---(end of broadcast)--

[ADMIN] System catalog for triggers

2003-09-10 Thread A.Bhuvaneswaran
Hi, This is my second post. I am using postgresql 7.3.2 on redhat linux 7.3. Where does postgresql store tg_op and tg_when details for a trigger? If i am right, it is not in pg_trigger catalog. TIA. regards, bhuvaneswaran ---(end of broadcast)---

Re: [ADMIN] table-column relation

2003-09-13 Thread A.Bhuvaneswaran
> does anybody know the internal pg_ tables that has table/column > definitions defined (similar to user_tab_columns in oracle) pg_class for tables. pg_attribute for columns. regards, bhuvaneswaran ---(end of broadcast)--- TIP 3: if posting/readin

Re: [ADMIN] SQL-Statement

2003-09-16 Thread A.Bhuvaneswaran
> SELECT * FROM Hauptantrag WHERE (select datenfeldname from datenexport) > > (select datum_von from datenexport) AND (select datenfeldname from > datenexport) < (select datenexport.datum_bis from datenexport) limit 10; It is not correct. You have not defined the condition between hauptantrag &

Re: [ADMIN] how to find multi-byte is enabled or not for 7.2.3

2003-09-17 Thread A.Bhuvaneswaran
> I have 7.2.3 postgres database running. how to find that the multi-byte > is enabled or not for my database. You should have used --enable-multibyte option during configure. If you had, you can use 'pg_config --configure' to ensure it. regards, bhuvaneswaran ---(end o

Re: [ADMIN] how to take a single table data backup in postgres 7.2.3

2003-09-25 Thread A.Bhuvaneswaran
> I would appreciate if some one could help me how to take a single table > back up in postgres 7.2.3. $ pg_dump -h hostname dbname -t tablename -uf filename.sql regards, bhuvaneswaran ---(end of broadcast)--- TIP 6: Have you searched our list arc

Re: [ADMIN] pg_dump.. auto backup

2003-10-16 Thread A.Bhuvaneswaran
> I don't really understand this. How to put password in ~/.pgpass. What > changes do I need to do on the script? How do I access to the password > to authenticate? Follow the below steps to automate your backup process. bash$ echo your_host:5432:your_user:your_db:your_pass > ~/.pgpass bash$ chmo

Re: [ADMIN] problems with missing bin

2003-10-16 Thread A.Bhuvaneswaran
> I get an error stating there is no such directory. The question is, how > do I get the postgres bin created? I suppose, you have installed it from binary rpm. By default, packages will be installed in /usr/bin/. If you wish to have postgres commands in seperate directory, you might require to re

Re: [ADMIN] Prompts in psql

2003-10-21 Thread A.Bhuvaneswaran
> [EMAIL PROTECTED]:database $ > => \set PROMPT1 '[EMAIL PROTECTED]:%/ $' -- Refer psql manual for details regards, bhuvaneswaran ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomai

Re: [ADMIN] pg_dump still requires password

2003-11-12 Thread A.Bhuvaneswaran
> I have tried with pgpass but still it do > es not work. I created the pgpass as per below: > Version? ~/.pgpass is supported since 7.3. Two more solutions are: 1) Set PGPASSWORD variable to avoid pg_dump asking for password 2) Set connection as trust in pg_hba.conf regards, bhuvaneswaran rega

Re: [ADMIN] easy way to copy all DBs and users on a server

2003-11-12 Thread A.Bhuvaneswaran
On Thu, 2003-11-13 at 07:47, exciteworks hosting wrote: > Is there an easy way to copy all DBs and users on a server to another > server? pg_dumpall is a good partner. If i am correct, you can also copy the entire data directory, provided if both versions are same. regards, bhuvaneswaran sign

Re: [ADMIN] createuser problem in 7.3.4 on Linux

2003-12-17 Thread A.Bhuvaneswaran
> As user postgres I have run initdb. I create a user named > Administrator via the createuser script. All goes well and I get the > response CREATE USER. > Then I try: > > psql -U Administrator template1 > > and get the response: > psql: FATAL: IDENT authentication failed for user "Administrat

Re: [ADMIN] createuser problem in 7.3.4 on Linux

2003-12-17 Thread A.Bhuvaneswaran
> You need to double quote the name to preserve case. IMO, in 7.3.4, these two scripts (createuser & dropuser) preserve the case by default even without double quote. For example, 'createuser Admin' makes an entry Admin(not admin) in pg_shadow. Similarly, dropuser deletes the same entry even with

Re: [ADMIN] system variable for update

2003-12-18 Thread A.Bhuvaneswaran
> in postgresql there is any system variable for update No such built-in feature is available. But, we can write a before trigger on update event to set the modified time. regards, bhuvaneswaran ---(end of broadcast)--- TIP 7: don't forget to in

[ADMIN] Index is not used

2003-12-19 Thread A.Bhuvaneswaran
Hi, I am using pgsql 7.3.4 on rh7.3. I have a table and an index on it. The index is used when i use '=' operator for the indexed field in the where condition. But the index is not used when i use '>=' operator for the same field. Herewith i have attached the explain output. Hope to get some ligh

Re: [ADMIN] Index is not used

2003-12-19 Thread A.Bhuvaneswaran
> Unsurprising. An inequality condition may require fetching many rows > (the planner is estimating 336289 rows here...) and so an indexscan is > not necessarily quicker. Have you compared actual runtimes with > enable_seqscan on and off? I did run with enable_seqscan off. You are right, the pl

Re: [ADMIN] pg_dump vs pg_dumpall - small database cluster,

2003-12-19 Thread A.Bhuvaneswaran
> databases, and pg_dumpall is suited to dumping a database _system_ (ie, > multiple databases on one host). > Right. > pg_dumpall seems to do this for me, without any command-line args > needed. Am I correct in saying that 'pg_dumpall > filename' will produce > a PostgreSQL dump that include

Re: [ADMIN] drop column

2003-12-30 Thread A.Bhuvaneswaran
> A command for remove the column but it not work > it gives parse error > ALTER TABLE tablename DROP COLUMN fieldname; drop column feature is implemented since 7.3. So, you please check out your version. regards, bhuvaneswaran signature.asc Description: This is a digitally signed message part

Re: [ADMIN] query

2004-01-06 Thread A.Bhuvaneswaran
> could you please let me know how to represent an image when creating a data > table using > postgresql Refer the documentation for details on lo_import and lo_export functions. It must help you. regards, bhuvaneswaran signature.asc Description: This is a digitally signed message part

Re: [ADMIN] query

2004-01-08 Thread A.Bhuvaneswaran
> Hi, > could you please let me know how to represent an image when creating a data > table using > postgresql Refer the documentation for details on lo_import and lo_export functions. It must help you. regards, bhuvaneswaran --- Disclaimer: http://www.bksystems.co.in/email-policy/disclaimer.t

Re: [ADMIN] Fw: postgres logging

2004-01-23 Thread A.Bhuvaneswaran
w which sql comes from which connection. Regards, A.Bhuvaneswaran signature.asc Description: This is a digitally signed message part

[ADMIN] host & hostssl entries in single pg_hba.conf

2004-04-12 Thread A.Bhuvaneswaran
ssible to have host & hostssl entry in single pg_hba.conf ? TIA. -- Regards, A.Bhuvaneswaran Systems Engineer signature.asc Description: This is a digitally signed message part