Re: [ADMIN] Who's attached to the database?

2008-07-03 Thread Bricklen Anderson
Carol Walter wrote: Thanks, guys, This told me that the user that has it open is the interface user called db_user. Is there a command to disconnect this user? Carol select pg_cancel_backend(); -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subsc

Re: [ADMIN] sequences

2007-04-04 Thread Bricklen Anderson
Alexander B. wrote: Hi, I tried to find, but I didn't, I would like to know what's the view to list all sequences! Thank you \ds or select * from pg_class where relkind = 'S'; ---(end of broadcast)--- TIP 4: Have you searched our list archives

Re: [ADMIN] pg_dump inquiry

2007-02-28 Thread Bricklen Anderson
Karthikeyan Sundaram wrote: Hi, I have to dump only 10 tables out of 100 tables. In the pg_dump utility given by postgres there is an option called -t followed by table name. In that option, if I give more than 1 table, it's not accepting. How can I get the dump in one stroke for

Re: [ADMIN] Performances

2006-12-28 Thread Bricklen Anderson
Cedric BUSCHINI wrote: Hello everyone, A quick question: - how long does it take you to perform that query : "SELECT COUNT(*) FROM A_TABLE;" Not long :) dev5=# SELECT COUNT(*) FROM A_TABLE; ERROR: relation "a_table" does not exist ---(end of broadcast)-

Re: [ADMIN] Dump and Query

2006-12-27 Thread Bricklen Anderson
Andy Shellam (Mailing Lists) wrote: Hi Enrico, The following command will get you a text file of your result-set: # echo "SELECT customer_id, first_name, sur_name FROM users;"|/usr/local/pgsql/bin/psql -U [username] -d [database] > myfile.txt # cat myfile.txt Alternative version: psql -d

Re: [ADMIN] Simple Unload

2006-12-11 Thread Bricklen Anderson
Naomi Walker wrote: From time to time, I need to unload rows to a delimited file, specifically with a "where" clause. I've cobbled a script together to do this, but it seems like a reasonable utility to support. Sort of a pg_dump on steroids.. Have I missed the simple way to do this? Would some

Re: [ADMIN] Missing Earth Distance Functions Under Debian

2006-10-19 Thread Bricklen Anderson
Duncan McDonald wrote: Hi Tom, Thanks for the reply. No I didn't run the earthdistance.sql script on the backup database, is this included with the standard PostgreSQL package? If not, would you mind letting me know how/where to obtain it? I'm relatively new to PostgreSQL administration so

Re: [ADMIN] Copying data from table to table (cloned tables)

2006-10-09 Thread Bricklen Anderson
Fourat Zouari wrote: Hello all, Any one could suggest the best way to copy data from table to table in the same db, the reason why am seeking for this is that the first table is becoming very big, and old data has no reason why to stay there, so i created a cloned table but without indexes and

Re: [ADMIN] IsDate function in plpgsql

2006-04-27 Thread Bricklen Anderson
Sistemas C.M.P. wrote: A few days ago, someone in this list gives me a function (plpgsql) that evaluates if a string is a valid date or not. It returns 1 or 0 (valid/Not Valid) The problem is that if the argument is a NULL field the function returns 1. I don't have experience with plpgsql langu

Re: [ADMIN] the time for [EMAIL PROTECTED] has come?

2005-12-08 Thread Bricklen Anderson
Guido Barosio wrote: All, (boring mail ahead) Writing here to get in contact with major people. Recently, with the new Windows port, and a great massive reception of the new release, I've noticed that too many threads are being sent to pgsql-admin regarding: "How do I install" "How do I b

Re: [ADMIN] Backing up views, functions

2005-12-08 Thread Bricklen Anderson
Benjamin Arai wrote: I have a database of several million records and we are currently developing pl functions and views. How do you dump only the code for views and functions? Benjamin Also, one way of recreating views: select 'drop view '||viewname||'; CREATE OR REPLACE view '||viewname|

Re: [ADMIN] Backing up views, functions

2005-12-08 Thread Bricklen Anderson
Benjamin Arai wrote: I have a database of several million records and we are currently developing pl functions and views. How do you dump only the code for views and functions? Benjamin This has come up before, if you search the archives, you'll find various ways of accomplishing this. Her

Re: [ADMIN] upgrade database to 8.1 - 2GB file limit (pg_dump)

2005-11-30 Thread Bricklen Anderson
Tomeh, Husam wrote: I'm upgrading from 8.0 to 8.1 on RedHat 2.6 kernel. I'm hitting the file max limit of 2 GB file when I pg_dump my database (even if I compress the dump file as it gets generated using a pipe). pg_dump is the recommendation stated in the INSTALL doc to upgrade; what would be

Re: [ADMIN] Moving pg_xlog problem

2005-11-08 Thread Bricklen Anderson
Joost Kraaijeveld wrote: > lrwxrwxrwx 1 root root pg_xlog -> /opt/pg_xlog Maybe this one here? Try chown'ing it to postgres:postgres and see what happens -- ___ This e-mail may be privileged and/or confidential, and the sender does not waive any related ri

Re: [ADMIN] sleep?

2005-08-21 Thread Bricklen Anderson
Don Drake wrote: Is there a sleep function in plpgsql? I need to wait a period time (60 seconds) in a while loop. I didn't see anything in the docs. Thanks. -Don create or replace function sleep(integer) returns void as $$ return sleep(shift) $$ language plperlu immutable strict; select

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread Bricklen Anderson
Lee Wu wrote: > > How can I save PG data into text file without using pg_dump? > did you try select * from table \o '/var/tmp/textfile.txt' ; -- ___ This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations

Re: [ADMIN] catastrophic error

2005-05-12 Thread Bricklen Anderson
Joel Fradkin wrote: Hi, I have been live for 4 days (vacuums run each night and backups done each night). Today around 2:30 PM EST my web app returned a catastrophic error. Both web servers appeared to have the issue. I could go on them and get data via pgadmin. I could log on the server (IIS

Re: [ADMIN] Statistics Buffer is full

2005-05-06 Thread Bricklen Anderson
Pallav Kalva wrote: Hi Everybody, I got this logged in my log file last night on my production database while doing vacuumdb with analyze option , is this normal ? does it affect the system anyway ? is there anyway to get rid of these messages ? 2005-05-06 00:31:03 EDT%%% LOG: statistics buf