Re: [GENERAL] Problem importing a csv file

2011-08-28 Thread Shoaib Mir
On Mon, Aug 29, 2011 at 11:21 AM, planas jsloz...@gmail.com wrote: ** CREATE TABLE *ContactUpdates* ( VendorID integer NOT NULL, LastName character varying(45), FirstName character varying(45), CONSTRAINT ContactUpdates_pkey PRIMARY KEY (VendorID ) ERROR: relation countupdates

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Shoaib Mir
On Thu, Aug 25, 2011 at 11:17 AM, Toby Corkindale toby.corkind...@strategicdata.com.au wrote: Do I need to make sure I re-create every index on every child table I create? That would be.. annoying, at best. Is there a way to enable inheritance of indexes too? You do not need an index on

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Shoaib Mir
On Thu, Aug 25, 2011 at 11:57 AM, Toby Corkindale toby.corkind...@strategicdata.com.au wrote: It seems messy to inherit the columns but not the indexes or checks upon them :( Yes it can be a bit annoying at timse but you can try to automate the whole process as well. Like I found this blog

Re: [GENERAL] Links to Replication

2011-08-24 Thread Shoaib Mir
On Thu, Aug 25, 2011 at 2:03 PM, Adarsh Sharma adarsh.sha...@orkash.comwrote: Dear all, I am using PostgresPlus-8.4SS version of Postgres on Linux Windows Systems. Now I need to enable replication of two servers. OS may be same or different. Please let me know any useful links to do

[GENERAL] shared folder in Hot Standby

2011-04-03 Thread Shoaib Mir
the files. Now if we cant have that shared location and a scenario where all slaves and the master cant see one shared location, how to approach this? cheers, -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] Import id column then convert to SEQUENCE?

2010-12-09 Thread Shoaib Mir
. Is this possible/the best solution? Maybe a migration utility would be better? Suggestions? Try using SERIAL datatype. -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] Import id column then convert to SEQUENCE?

2010-12-09 Thread Shoaib Mir
On Fri, Dec 10, 2010 at 2:53 PM, Shoaib Mir shoaib...@gmail.com wrote: On Fri, Dec 10, 2010 at 2:44 PM, gvim gvi...@gmail.com wrote: I'm migrating a database from MySQL and need to keep the original `id` column (AUTO_INCREMENT) intact so my plan is to create an simple integer `id` column

Re: [GENERAL] Porting from MS Access 2007 to PostgreSQL

2010-11-08 Thread Shoaib Mir
On Tue, Nov 9, 2010 at 3:22 PM, Victor Hooi victorh...@yahoo.com wrote: *4. MS Access to Postgres* Hmm have you tried Kettle (Pentaho) http://kettle.pentaho.com/ Any particularly good books here that you'd recommend? http://www.2ndquadrant.com/books/ -- Shoaib Mir http

Re: [GENERAL] Adivice on master - master replication.

2010-10-28 Thread Shoaib Mir
be no interruption to the web servers. I have used Rubyrep for such scenario in the past but that was for a small database so it didn't give me much trouble. http://www.rubyrep.org/ -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] [SQL] How to Convert Integer to Serial

2010-10-28 Thread Shoaib Mir
); -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] [SQL] How to Convert Integer to Serial

2010-10-28 Thread Shoaib Mir
On Fri, Oct 29, 2010 at 3:58 PM, venkat ven.tammin...@gmail.com wrote: Dear All, I got the solution... Here is my query ALTER TABLE DemoTable ALTER gid TYPE INT2; Are you sure that you have converted here to a SERIAL type? -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] [SQL] How to Convert Integer to Serial

2010-10-28 Thread Shoaib Mir
in there. Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] Locking Down a Database

2010-07-15 Thread Shoaib Mir
for a short period of time so that no updates are being performed anywhere. There is something that I saw the other day in PG 9.0 i.e. transaction_read_only which might be helpful in your case. -- Shoaib Mir http://shoaibmir.wordpress.com/

[GENERAL] Hot Standby switchover

2010-06-22 Thread Shoaib Mir
the new master and have my replication look like this: B -- C B -- A Where are the steps I need for doing so? Thanks, -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] Hot Standby switchover

2010-06-22 Thread Shoaib Mir
helpful. But again comparing to other third party solutions it seems just very simple to setup for replication and sure does work nice. I cant wait for 9.1 already :) Regards, -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-21 Thread Shoaib Mir
figure there's a tech reason for this - the demand must be there! No? There is one already: https://public.commandprompt.com/projects/plphp -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] sintax error in script

2010-05-28 Thread Shoaib Mir
this in PLPSQL functions myself -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] 'Infinity' in date columns?

2010-05-16 Thread Shoaib Mir
-4ubuntu9) 4.4.1, 32-bit (1 row) -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] lobj_lock_table structure

2010-05-06 Thread Shoaib Mir
of lobj_lock_table? This is not a PgPool mailing list, please post it to the appropriate list such as http://lists.pgfoundry.org/pipermail/pgpool-general/ http://lists.pgfoundry.org/pipermail/pgpool-general/ -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] no such file euc2004... while initdb 9.0Beta

2010-05-05 Thread Shoaib Mir
/43-How-to-install-PostgreSQL-9.0-Beta-1-to-FedoraCentOSRHEL.htmland see if that fixes the problem. -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] Help with tracking!

2010-05-03 Thread Shoaib Mir
and log_statement setting properly in postgresql.conf so that you get the user info and other appropriate details. After that you can tail the DB server log file and grep for that specific user to get what sort of SQL is been executed. -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] postgres crashes - could not reattach to shared memory

2010-05-02 Thread Shoaib Mir
was running on the system as well. If you have such installed can you try removing it and then see how it goes? -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] Server not Starting

2010-04-14 Thread Shoaib Mir
pg_resetxlog to reset the control info on the DB cluster. Once you have done that try re-starting and hopefully that should work then, but you will I think lose everything from the last checkpoint by using pg_resetxlog. -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] Server not Starting

2010-04-14 Thread Shoaib Mir
this way you might be able to start the server but you will lose the data from the time after your last checkpoint. -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] Server not Starting

2010-04-14 Thread Shoaib Mir
in my last email. -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] string reverse fucntion?

2010-02-09 Thread Shoaib Mir
(original,i,1); END LOOP; RETURN reverse_str; END;$_$ LANGUAGE plpgsql IMMUTABLE; -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] add column specify position

2010-02-02 Thread Shoaib Mir
On Wed, Feb 3, 2010 at 4:14 PM, Scott Frankel fran...@circlesfx.com wrote: Hi all, Is it possible to specify a position when adding a column to a table? Not possible, but have a read of http://wiki.postgresql.org/wiki/Alter_column_position and look at the alternative options. -- Shoaib

Re: [GENERAL] Extracting SQL from logs in a usable format

2009-12-19 Thread Shoaib Mir
start writing my own log parser? I am not sure if its still available but there used to a nice tool for doing the same, I guess it was named as Playr by myyearbook. Regards, -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] Simulate count result are distinct between 8.3 and 8.4

2009-08-12 Thread Shoaib Mir
(), i, p from prueba limit 5; -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] NOTICE: there is no transaction in progress

2009-08-10 Thread Shoaib Mir
. -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] psql crashing - don't know why

2009-08-09 Thread Shoaib Mir
... that might help in this case -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] how to specify the locale that psql uses

2009-03-26 Thread Shoaib Mir
messages: - For client programs like psql, change the current locale where you are starting up psql. I am not sure about windows but in Linux you can do this by setting LANG environment variable. -- Shoaib Mir http://shoaibmir.wordpress.com/

Re: [GENERAL] Are indexes blown?

2008-02-15 Thread Shoaib Mir
this simple query? There are about 3 million rows in this table. Use the *'pgstattuple'* contrib module -- http://www.postgresql.org/docs/current/static/pgstattuple.html *pgstatindex* function from the contrib module should be able to help you there. -- Shoaib Mir Fujitsu Australia Software

Re: [GENERAL] Are indexes blown?

2008-02-15 Thread Shoaib Mir
(this will copy pgstattuple.so file to the lib folder of your PostgreSQL installation) - Now from psql execute the pgstattuple.sql file for that specific database which can be found in PG-HOME/share/contrib folder - Once the sql file is executed now you can use the pgstattuple function -- Shoaib Mir Fujitsu

Re: [GENERAL] Are indexes blown?

2008-02-15 Thread Shoaib Mir
desktop machine, build it and then build the .so file for contrib module using 'make' and 'make install' once that is done copy the .so from lib folder of PG to your production PG box's lib folder. -- Shoaib Mir Fujitsu Australia Software Technology [EMAIL PROTECTED]

Re: [GENERAL] Issues with PL/PGSQL function..

2007-07-16 Thread Shoaib Mir
Try using it with 'execute' as that might help... OR: CREATE TEMP TABLE tblname WITH (OIDS) ON COMMIT DROP AS select * from someothertbl; that means the temporary table will be dropped at the end of the current transaction block. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 7/16/07

Re: [GENERAL] Running OS-level programs from Postgres?

2007-06-20 Thread Shoaib Mir
If you can use tcl based pl function, the this might help you here -- http://sourceforge.net/projects/pgmail/ -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 6/20/07, Joshua D. Drake [EMAIL PROTECTED] wrote: Sean Murphy wrote: Maybe this is a well duh kind of question, or maybe there's

Re: [GENERAL] Function with COPY command?

2007-06-14 Thread Shoaib Mir
Something like this will help: CREATE OR REPLACE FUNCTION import_text_file(char(255)) RETURNS void AS $$ DECLARE filename ALIAS FOR $1; fin varchar; BEGIN fin := 'COPY table from ' || filename; execute fin; END; $$ LANGUAGE plpgsql; -- Shoaib Mir EnterpriseDB (www.enterprisedb.com

Re: [GENERAL] Materializing the relation

2007-06-11 Thread Shoaib Mir
exceeds work_mem -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 6/11/07, rupesh bajaj [EMAIL PROTECTED] wrote: Hi, What is the meaning of 'materializing' a relation after sequential scan? explain select * from tb1, tb2 where tb1.c1 = tb2.c2; QUERY PLAN

Re: [GENERAL] [SQL] Inserting a path into Database

2007-06-04 Thread Shoaib Mir
If you are on 8.1 you can use double qoutes ( 'C:\\Program Files\\My program' ) on in 8.2 you can use the new backslash_quote (string) setting. You can find help on backslash_quote (string) at -- http://www.postgresql.org/docs/current/static/runtime-config-compatible.html -- Shoaib Mir

Re: [GENERAL] monitor stats

2007-05-29 Thread Shoaib Mir
Did you do a reload or restart of the server after doing this change? what do you see when you do this query? -- show log_statement -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 5/29/07, Diego Fernando Arce [EMAIL PROTECTED] wrote: this is a part of postgrsql.conf log_statement

Re: [GENERAL] monitor stats

2007-05-29 Thread Shoaib Mir
in your log file. -- Shoaib Mir EnterpriseDB (www.enterprisedb.co,) On 5/29/07, Diego Fernando Arce [EMAIL PROTECTED] wrote: show log_statement; log_statement --- all (1 fila) select pg_stat_get_backend_pid(s.backendid),pg_stat_get_backend_activity( s.backendid) from (select

Re: [GENERAL] Migrating data from mssql to postgresql

2007-04-05 Thread Shoaib Mir
You can use the MSSQL DTS wizard for that purpose and using PostgreSQL ODBC connector for target database connectivity there. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 4/5/07, M. Nejat AYDIN [EMAIL PROTECTED] wrote: How can I migrate data from mssql to postgresql? I have

Re: [GENERAL] [ADMIN] Increasing the shared memory

2007-04-02 Thread Shoaib Mir
I guess shared_buffers (in postgresql.conf file) will help you here if you have properly setup your kernel.SHMMAX value. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 4/2/07, Sorin N. Ciolofan [EMAIL PROTECTED] wrote: Hello! I'd like to ask you if there is any Postgre

Re: [GENERAL] Working between Windows and Unix

2007-04-02 Thread Shoaib Mir
Why dont you use the pg_dump ( http://www.postgresql.org/docs/8.2/static/backup-dump.html) utility of PostgreSQL. Use the -s switch for taking just the schema and -a for taking the data dumps. Try that and let us know if you face a problem doing so. -- Shoaib Mir EnterpriseDB

Re: [GENERAL] [ADMIN] Increasing the shared memory

2007-04-02 Thread Shoaib Mir
PostgreSQL documentation for instructions on this. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 4/2/07, Sorin N. Ciolofan [EMAIL PROTECTED] wrote: Thanks, I've a value of 1000 set for shared_buffers, does this means that I use 8kbX1000=8Mb of Shared Mem

Re: [GENERAL] VACUUM ANALYZE

2007-03-26 Thread Shoaib Mir
Yes, that is true if you have the autovacuum setting enabled for the database server. You can see the last auto vacuum and last auto analyze timestamp values from pg_stat_all_tables. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 3/21/07, Robert James [EMAIL PROTECTED] wrote: I see

Re: [GENERAL] Client/Server [max connections]

2007-03-19 Thread Shoaib Mir
It depends on the amount of memory you have... -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 3/19/07, Ezequias R. da Rocha [EMAIL PROTECTED] wrote: Hi list, Could someone tell me the experience of many connections to PostgreSQL ? I am my afraid if when PostgreSQL have many connections

Re: [GENERAL] Views dependency

2007-03-11 Thread Shoaib Mir
; = -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 3/11/07, Shoaib Mir [EMAIL PROTECTED] wrote: I can see the following in pg_depend: For view v1: classid | objid | objsubid | refclassid | refobjid | refobjsubid | deptype

[GENERAL] Views dependency

2007-03-10 Thread Shoaib Mir
but cant seem to get a simple output from it which should be like this: view_name | dependent_views v1 | v2 | v1 -- Shoaib Mir EnterpriseDB (www.enterprisedb.com)

Re: [GENERAL] Views dependency

2007-03-10 Thread Shoaib Mir
-++--++--+-+- _RETURN | 153521 | -1 | 1 | t | _RETURN | 153524 | -1 | 1 | t | Right now confused on how do I actually get the dependent views from this kind of output... any ideas? -- Shoaib Mir

Re: [GENERAL] How to use pg_resetxlog if data directory is in c:/Program Files ?

2007-03-08 Thread Shoaib Mir
Try using something like this -- Program Files/PostgreSQL/data (that is with quotes for using spaces) -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 3/8/07, Steven De Vriendt [EMAIL PROTECTED] wrote: Hi all, Got this kind of silly question. I'm trying to use pg_resetxlog. Problem

Re: [GENERAL] Password for postgres

2007-03-07 Thread Shoaib Mir
log in :) psql mydb postgres mypwd That is not the correct way, just as i mentioned change it to md5 and now when you do psql -d mydb -U postgres It will ask for a password. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 3/8/07, George Heller [EMAIL PROTECTED] wrote: Hi all, I am

Re: [GENERAL] How to append tables in a view

2007-02-13 Thread Shoaib Mir
2 | E 3 | C 3 | F -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/13/07, Shane Ambler [EMAIL PROTECTED] wrote: Ashish Karalkar wrote: Hello List, I want to append column of two different tables in a single column of a view . data type of tow column of two diffrent tables

Re: [GENERAL] How to append tables in a view

2007-02-13 Thread Shoaib Mir
So hmm a UNION with an ORDERY BY should be good for this scenario... -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/13/07, Shane Ambler [EMAIL PROTECTED] wrote: Shoaib Mir wrote: I guess UNION ALL should work good here instead of a UNION for the exact same kind of output he needs

Re: [GENERAL] Dumb question - how to tell if autovacuum is doing its job in 8.2.x

2007-02-13 Thread Shoaib Mir
or ANALYZE manually and see if that gets updated in the last_vacuum of pg_stats_all_tables. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/13/07, Walter Vaughan [EMAIL PROTECTED] wrote: Shoaib Mir wrote: pg_stat_all_table view should help you: select last_autovacuum, last_autoanalyze from

Re: [GENERAL] Dumb question - how to tell if autovacuum is doing its job in 8.2.x

2007-02-12 Thread Shoaib Mir
pg_stat_all_table view should help you: select last_autovacuum, last_autoanalyze from pg_stat_all_tables; -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/9/07, Sic Transit Gloria Mundi [EMAIL PROTECTED] wrote: Hi, I couldnt find this on google, the archives, or the manual

Re: [GENERAL] PGSQL backup options

2007-02-12 Thread Shoaib Mir
You can get the details at -- http://www.postgresql.org/docs/8.2/static/backup.html -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/13/07, RPK [EMAIL PROTECTED] wrote: We are planning a mission-critical client/server application and want to use PGSQL as backend to VB.NET. Before

Re: [GENERAL] Automating databse creation

2007-02-09 Thread Shoaib Mir
Yes, you can pass values to the scripts. Here is an example Suppose the script file 'test.sql' is like this: insert into test values (:chk1 , :chk2); Now you can pass the variables using psql as: psql -d test -U postgres -v chk1=5 -v chk2='abc' -f test.sql Hope that helps... -- Shoaib

Re: [GENERAL] temp tables in functions?

2007-02-08 Thread Shoaib Mir
values (1);'; return 1; end; $$ LANGUAGE 'plpgsql' used number by mistake so sorry for any inconvenience caused as I was trying it with EnterpriseDB (where 'number 'is added for Oracle compatibility) -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/8/07, Michael Fuhr [EMAIL PROTECTED

Re: [GENERAL] temp tables in functions?

2007-02-07 Thread Shoaib Mir
Something like this will help you: execute immediate 'create temporary table test (a number) on commit drop'; -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/8/07, Bruno Wolff III [EMAIL PROTECTED] wrote: On Wed, Feb 07, 2007 at 20:40:09 -0800, jws [EMAIL PROTECTED] wrote: Having

Re: [GENERAL] Locking question?

2007-02-06 Thread Shoaib Mir
There is such timeout from the database server for the idle connections but yes you can always use firewall settings in order to do that and kill idle connections. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/6/07, Gurjeet Singh [EMAIL PROTECTED] wrote: On 1/30/07, Alvaro Herrera

Re: [GENERAL] accidentally deleted user -- postgres

2007-02-06 Thread Shoaib Mir
to see if the db server is running or not. You can do that using: pg_ctl -D data folder path status Once that gives a good status then you might have to tweak 'pg_hba.conf' file to allow for users connecting to the database. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/2/07, gf [EMAIL

Re: [GENERAL] How can I list the function.

2007-02-01 Thread Shoaib Mir
a \df+ add did show me the correct output... You can also try the following to get the same type of results: select proargtypes, prorettype, prosrc from pg_proc where proname = 'delete_old'; --- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/1/07, Harvey, Allan AC [EMAIL PROTECTED] wrote

[GENERAL] Locking question?

2007-01-29 Thread Shoaib Mir
commit the client app crashes and the commit is never sent, will the Exclusive locks be automatically released? --- Shoaib Mir EnterpriseDB (www.enterprisedb.com)

Re: [GENERAL] Locking question?

2007-01-29 Thread Shoaib Mir
Thank you Alvaro :) - Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/30/07, Alvaro Herrera [EMAIL PROTECTED] wrote: Shoaib Mir wrote: While debugging an application, I just wanted to confirm from the list here: Suppose I have a long running transaction which has a few

Re: [GENERAL] how to read bytea field

2007-01-24 Thread Shoaib Mir
This might help you: select encode(col1,'escape') from tblBytea; where col1 is of type bytea... - Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/24/07, marcelo Cortez [EMAIL PROTECTED] wrote: folks help me ,i cant read bytea type field's. how to convert bytea to text

Re: [GENERAL] copy schema X to schema Y in the same DB

2007-01-24 Thread Shoaib Mir
I think the way of doing that will be taking a schema backup using pg_dump -n option and then restoring that again in the same database using a different schema name with psql. Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/24/07, johnf [EMAIL PROTECTED] wrote: Hi, I

Re: [GENERAL] how to read bytea field

2007-01-24 Thread Shoaib Mir
Decode works as expected for me Try the following: select decode((encode(E'\\000\\001', 'escape')::text), 'escape'); --- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/24/07, marcelo Cortez [EMAIL PROTECTED] wrote: hi Markus ,folks Are you sure you tested with a real

Re: [GENERAL] MSSQL/ASP migration

2007-01-23 Thread Shoaib Mir
In order to move data and tables from MS SQL Server to PostgreSQL, use the MS SQL Server DTS wizard and gave it the ODBC for PostgreSQL as the target database. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/23/07, Robert Fitzpatrick [EMAIL PROTECTED] wrote: On Mon, 2007-01

Re: [GENERAL] Who is Slony Master/Slave + general questions.

2007-01-22 Thread Shoaib Mir
I dont have the replication setup on my machine right now but I guess as far as I remember you can surely check for the master and slave nodes from a Slony schema table. Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 19 Jan 2007 08:25:23 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED

Re: [GENERAL] Alter definition of a column

2007-01-20 Thread Shoaib Mir
should be using varchar(n). - Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/20/07, Kelly Burkhart [EMAIL PROTECTED] wrote: On 1/20/07, Shoaib Mir [EMAIL PROTECTED] wrote: Should help -- ALTER TABLE tablename ALTER columname TYPE text; I was looking for a way to alter

Re: [GENERAL] Who is Slony Master/Slave + general questions.

2007-01-19 Thread Shoaib Mir
the master node goes down. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/19/07, Stéphane Schildknecht [EMAIL PROTECTED] wrote: Hello, You should ask directly to the slony1 mailing list. [EMAIL PROTECTED] a écrit : (...) The Slony version I'm using is 1.1.2. The current

Re: [GENERAL] Installing Postegres side-by-side with M$ SQL server

2007-01-19 Thread Shoaib Mir
functions. You can find some good detail over here as well -- http://www.postgresql.org/docs/techdocs.29 Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/19/07, Paul Lambert [EMAIL PROTECTED] wrote: G'day folks, I'm faily new to the world of Postgre so excuse me

Re: [GENERAL] Alter definition of a column

2007-01-19 Thread Shoaib Mir
Should help -- ALTER TABLE tablename ALTER columname TYPE text; Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/20/07, Kelly Burkhart [EMAIL PROTECTED] wrote: On 1/19/07, Martijn van Oosterhout kleptog@svana.org wrote: ALTER TABLE, to be correct, actually has to check

Re: [GENERAL] Backup the part of postgres database

2007-01-15 Thread Shoaib Mir
COPY command might also help COPY (SELECT * FROM country WHERE country_name LIKE 'A%') TO '/usr1/proj/bray/sql/a_list_countries.copy'; Details can be found at -- http://www.postgresql.org/docs/current/static/sql-copy.html -- Shoaib Mir EnterpriseDB (www.enterprisedb.com

Re: [GENERAL] Performance with very large tables

2007-01-15 Thread Shoaib Mir
You can also opt for partitioning the tables and this way select will only get the data from the required partition. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/15/07, Richard Huxton dev@archonet.com wrote: Jan van der Weijde wrote: Hello all, one of our customers

Re: [GENERAL] Performance with very large tables

2007-01-15 Thread Shoaib Mir
Oh yes, need to have a condition first for which you have partitioned tables. Only in that case it will work with partitions. --- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/15/07, Richard Huxton dev@archonet.com wrote: Shoaib Mir wrote: You can also opt for partitioning

Re: [GENERAL] check table existence...

2007-01-15 Thread Shoaib Mir
; IF v_cnt 0 THEN v_tbl = 'true'; END IF; IF v_cnt = 0 THEN v_tbl = 'false'; END IF; return v_tbl; END; $$ LANGUAGE 'plpgsql' = select check_table('emp', 'public'); --- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/15/07, Alban

Re: [GENERAL] Performance with very large tables

2007-01-15 Thread Shoaib Mir
If you go with Java, you can make it faster by using setFetchSize (JDBC functionality) from client and that will help you with the performance in case of fetching large amounts of data. --- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/15/07, Jan van der Weijde [EMAIL

Re: [GENERAL] Performance with very large tables

2007-01-15 Thread Shoaib Mir
An old post on the archives might help you -- http://archives.postgresql.org/pgsql-interfaces/2005-11/msg00010.php that was an attempt to simulate functionality similar to setFetchSize in JDBC. --- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/15/07, Jan van der Weijde [EMAIL

Re: [GENERAL] like query backslash

2007-01-14 Thread Shoaib Mir
literals will be processed. The presence of this parameter can also be taken as an indication that the escape string syntax (E'...') is supported. Escape string syntax should be used if an application desires backslashes to be treated as escape characters. --- Shoaib Mir EnterpriseDB

Re: [GENERAL] Problems with unique restrictions

2007-01-14 Thread Shoaib Mir
You can give EnterpriseDB PL Debugger a try, details for its usage can be found at -- http://www.enterprisedb.com/documentation/debugger.html -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/14/07, Marcel Gsteiger [EMAIL PROTECTED] wrote: thanks for responding. Meanwhile I

Re: [GENERAL] PostgreSQL Connections?

2007-01-10 Thread Shoaib Mir
Can you show us the output for: ps auxwww | grep ^postgres that should explain a little more... - Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/10/07, Ashish Karalkar [EMAIL PROTECTED] wrote: Hello All, I am running PostgresSQL 8.2 on Redhat Linux 4. When I look

Re: [GENERAL] Command connect by prior in PostgreSQL ?

2007-01-08 Thread Shoaib Mir
There is no default support but you can always use connectby() function from the tablefunc contrib module -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/8/07, Leandro Repolho [EMAIL PROTECTED] wrote: Hello everybody, In Oracle i use the command connect by prior and i

Re: [GENERAL] Command connect by prior in PostgreSQL ?

2007-01-08 Thread Shoaib Mir
It is used for Hierarchical queries in Oracle :) Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/8/07, Scott Marlowe [EMAIL PROTECTED] wrote: On Mon, 2007-01-08 at 07:38, Leandro Repolho wrote: Hello everybody, In Oracle i use the command connect by prior and i need

Re: [GENERAL] Slony in Windows installer?

2007-01-08 Thread Shoaib Mir
It does install both the Slony binaries and scripts. Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/8/07, Raymond O'Donnell [EMAIL PROTECTED] wrote: Hello all, When installing PostgreSQL via the Windows installer, Slony-I is one of the options offered. Does it install

[GENERAL] Re: [GENERAL] 答复: [GENERAL] Need Help

2006-12-28 Thread Shoaib Mir
This should help you get the disk usage for a table: select pg_size_pretty(pg_relation_size('tablename')); --- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/28/06, 马庆 [EMAIL PROTECTED] wrote: Maybe U can't get the disk usage info, but you can try command explain -邮件原

Re: [GENERAL] Backup Restore

2006-12-28 Thread Shoaib Mir
Well I haven't use much of PGAdmin but I will always be using pg_dump and pg_restore for that as they are really easy to use. You can find help on backup and restore at -- http://www.postgresql.org/docs/8.2/static/backup.html Shoaib Mir EnterpriseDB (www.enterprisedb.com

Re: [GENERAL] Clustering Load Balancing Replication

2006-12-26 Thread Shoaib Mir
pgpool-II might help you there too I guess... --- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/26/06, Andy Dale [EMAIL PROTECTED] wrote: Hi, I have just read the statement that Postgres does have (with end user assembly) multi-master replication system. Is this just

Re: [GENERAL] Clustering Load Balancing Replication

2006-12-26 Thread Shoaib Mir
Yes, that is true with pgpool. I did face the same as well. There is another as well Uni-Cluster ( http://www.continuent.com/index.php?option=com_contenttask=viewid=213Itemid=170), haven't tried yet but it might help you there... --- Shoaib Mir EnterpriseDB (www.enterprisedb.com

Re: [GENERAL] Clustering Load Balancing Replication

2006-12-26 Thread Shoaib Mir
if that can work for you, haven't tried that myself but will like to hear about PostgreSQL configuration with OpenSSI --- Shoaib Mir EnterpriseDB ( www.enterprisedb.com) On 12/26/06, Andy Dale [EMAIL PROTECTED] wrote: The company i am working for has a trail/evaluation license for p

Re: [GENERAL] Clustering Load Balancing Replication

2006-12-26 Thread Shoaib Mir
in case of a master node failure, and then you can actually do the load balancing by using the slave nodes in the system. Please let me know on any updates for OpenSSI if you get a chance to try that out --- Shoaib Mir EnterpriseDB ( www.enterprisedb.com) On 12/26/06, Andy Dale [EMAIL

Re: [GENERAL] psql SCHEMA switch

2006-12-25 Thread Shoaib Mir
In your SQL script file you can add at the start something like this: set search_path = contrib and that should take care of it without this change in psql. Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/23/06, Paul Silveira [EMAIL PROTECTED] wrote: I was trying

Re: [GENERAL] Partitioning Vs. Split Databases - performance?

2006-12-24 Thread Shoaib Mir
it PostgreSQL on OpenSSI that will be a good info to have. - Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/24/06, Lincoln Yeoh lyeoh@pop.jaring.my wrote: At 08:12 AM 12/22/2006, Joshua D. Drake wrote: With One Big Database, you can get a SAN and attach a whole lot of disk

Re: [GENERAL] Clustering Load Balancing Replication

2006-12-24 Thread Shoaib Mir
. - Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks Chris, I see you a core member of Slony team and a replication guru so I'll look into it. I'm not slamming Slony I think its probably the right tool for type of work your company Afilias

Re: [GENERAL] tape backups

2006-12-23 Thread Shoaib Mir
I think you might want to do incremental backups so a better approach to that as you mentioned too will be WAL files. For details you can refer to -- http://www.postgresql.org/docs/current/static/continuous-archiving.html Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12

Re: [GENERAL] [ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Shoaib Mir
Try increasing the work_mem first to see the change, that might help. - Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/24/06, Benjamin Arai [EMAIL PROTECTED] wrote: I have been running pieces of my PL function by hand and I have found that the following queries work

Re: [GENERAL] [ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Shoaib Mir
adding to the last email, for now try the work_mem but you should be adding ANALYZE along with the VACUUM (with a cron job I guess) you do regularly. Shoaib Mir EntperpriseDB (www.enterprisedb.com) On 12/24/06, Shoaib Mir [EMAIL PROTECTED] wrote: Try increasing the work_mem

Re: [GENERAL] [ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Shoaib Mir
Yes, ANALYZE should definitely improve the performance for query... -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/24/06, Benjamin Arai [EMAIL PROTECTED] wrote: Just to make things more clear I ran EXPLAIN ANALYZE on the slow query. I got Merge Full Join (cost=62.33

  1   2   >