Re: [GENERAL] Postgresql Page Layout details

2008-03-06 Thread Najib Abi Fadel
accessing 1 page in postgres may require reading 2 distant blocks! According to my understanding of how file system works, a file system block is the unit of exchange between the hard disk and the main memory. am i missing something ?? --- Richard Huxton [EMAIL PROTECTED] wrote: Najib Abi Fadel

[GENERAL] Postgresql Page Layout details

2008-03-05 Thread Najib Abi Fadel
Dear all, i was reading the postgres docs concerning the Database Physical Storage. I found that the information present there is not enough to satisfy my curiosity. Are there any documentation out there that describes in more details the Database Physical Storage of potgres ? In the Page

[GENERAL] verifying data integrity after migrating for postgres 7.3 to postgres 8.1

2006-10-20 Thread Najib Abi Fadel
Hi, i migrated my database from postgres 7.3 to postgres 8.1. I was wondering if there is a way to verify that data has been well copied betweeen the 2 versions ! I thought about writing a script that will verify that we have the same tables and the same number of lines per table between the 2

[GENERAL] Moving postgres users accounts from one postgres 7.3 to postgres 8.0

2006-10-18 Thread Najib Abi Fadel
Hi,i need to move my postgres users with their passwords from one postgres version (7.3) to a newer one (8.1) . Is there an automatic way to do that without having to recreate the users with their passwords ??Thanks for any helpNajib.

Re: [GENERAL] grant select on all tables of schema or database

2006-09-28 Thread Najib Abi Fadel
when u connect to the database type:\h GRANTand you will get all the Grant options:GRANT { { CREATE | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] } ON DATABASE dbname [, ...] TO { username | GROUP groupname | PUBLIC } [, ...] [ WITH GRANT OPTION ]This will grant the privileges on all tables

Re: [GENERAL] Full Text fuzzy search

2006-09-28 Thread Najib Abi Fadel
for PostgreSQL, Postgresql, postgresql u can use ilike:example: select * from table where name ilike 'postgresql'U can even try:select * from table where name ilike '%postgresql%'the '%' is for any set of caracters (like * when u are doing a shell commande)For the others (bostgresql, posdgresql,

Re: [GENERAL] What is the Best Postgresql Load Balancing Solution available ?

2006-09-27 Thread Najib Abi Fadel
m. Good luck. On 9/21/06, Najib Abi Fadel <[EMAIL PROTECTED]> wrote: Hi again, How can i use connection pooling ? Should i use a software like PGPool ? Will the connection pooling boost considerably the performance ? Leonel adviced me to use persistent connections ? hos do i use that ?

Re: [GENERAL] What is the Best Postgresql Load Balancing Solution available ?

2006-09-24 Thread Najib Abi Fadel
] wrote: You should also consider using connection pooling inorder to attain better performance. Regards Talha Khan On 9/20/06, Najib Abi Fadel [EMAIL PROTECTED] wrote: I have a web application that is accessed by a large number of users. My application is written in PHP and uses postgres. Apache

[GENERAL] Can i switch to the use of persistent connections with my already in use application without worrying ?

2006-09-22 Thread Najib Abi Fadel
Hi,i have an already running web application with a lot of users. All the connections to the postgresql database are not persistent. I was wondering if it is possible to switch to persistent connection without having problems in my current in production application in order to boost performance

Re: [GENERAL] What is the Best Postgresql Load Balancing Solution available ?

2006-09-20 Thread Najib Abi Fadel
, then someone could give you a better answer!Regards,Ben"Najib Abi Fadel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]Robin Ericsson <[EMAIL PROTECTED]> wrote:On 9/18/06, Najib Abi Fadel wrote: Hi, i was searching for a load balancing solution for postgres, I found some

Re: [GENERAL] What is the Best Postgresql Load Balancing Solution available ?

2006-09-20 Thread Najib Abi Fadel
, then someone could give you a better answer!Regards,Ben"Najib Abi Fadel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]Robin Ericsson <[EMAIL PROTECTED]> wrote:On 9/18/06, Najib Abi Fadel wrote: Hi, i was searching for a load balancing solution for postgres, I found some

Re: [GENERAL] What is the Best Postgresql Load Balancing Solution available ?

2006-09-18 Thread Najib Abi Fadel
Robin Ericsson [EMAIL PROTECTED] wrote: On 9/18/06, Najib Abi Fadel <[EMAIL PROTECTED]> wrote: Hi, i was searching for a load balancing solution for postgres, I found some ready to use software like PGCluster, Slony, pgpool and others. It would really be nice if someone knows which one is th

[GENERAL] What is the Best Postgresql Load Balancing Solution available ?

2006-09-17 Thread Najib Abi Fadel
for any help. Najib Abi Fadel System Administrator Saint-Joseph University __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end of broadcast

[GENERAL] The Best Postgresql Load Balancing Solution

2006-09-15 Thread Najib Abi Fadel
Hi,i was searching for a load balancing solution for postgres, I found some ready to use software like PGCluster, Slony, pgpool and others.It would really be nice if someone knows which one is the best taking in consideration that i have an already running application that i need to load balance.I

Re: [GENERAL] postgresql and javascript

2004-12-10 Thread Najib Abi Fadel
Hi i don't see any practical use of _javascript_ with Postgresql, since a _javascript_ is on the client side. Unless you want each client machine to have its own database ! Najib. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]

Re: [GENERAL] granting privileges

2004-12-01 Thread Najib Abi Fadel
Hi Nageshwar try this command i think it's what you need. psql -t -dDataBaseName -c "select tablename from pg_tables where schemaname='theSchemaName' " | xargs -i psql -t -d DataBaseName -c "grant select on {} to nabifadel" Najib. Programmer at Saint-Joseph University Lebanon -

[GENERAL] Row creation time

2004-11-24 Thread Najib Abi Fadel
Is there a to get the row creation time if we know it's object ID ?? Thx

Re: [GENERAL] Row creation time

2004-11-24 Thread Najib Abi Fadel
Message - From: Michael Glaesemann [EMAIL PROTECTED] To: Najib Abi Fadel [EMAIL PROTECTED] Cc: generalpost [EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 12:40 PM Subject: Re: [GENERAL] Row creation time On Nov 24, 2004, at 7:07 PM, Najib Abi Fadel wrote: Is there a to get the row

Re: [GENERAL] Mathematical operations with NULL values

2004-10-15 Thread Najib Abi Fadel
You can replace Null values by the and make the defaut Value 0 ! If u can't change the Data in the databaseyou can use the coalesce function which replaces the Null value by zero (or any specified value in thesecond argument): select (coalesce(m1,0) + coalesce(m2,0) + ...

Re: [GENERAL] Multiple Rules :: Postgres Is confused !!

2004-09-30 Thread Najib Abi Fadel
ALL rules get executed. Conditions get combined (actually, parse trees get merged). === BEGIN rule_test.sql === CREATE TABLE foo (a int4 PRIMARY KEY, b text); COPY foo FROM stdin; 1 aaa 2 bbb 3 ccc 4 aaa 5 bbb 6 ccc \. CREATE VIEW foo_v AS SELECT * FROM foo WHERE b='bbb'; CREATE

[GENERAL] Multiple Rules :: Postgres Is confused !!

2004-09-29 Thread Najib Abi Fadel
Hi all i am running PostgreSQL 7.3.2, i have aVIEW for which i implemented multipleRULES on UPDATE. The weird think is that the Update Query corresponding to one of the rules is updating MULTIPLE ROWS even though it should only update one ROW !! THE WEIRDEST is that when i remove 2 of

Re: [GENERAL] Multiple Rules :: Postgres Is confused !!

2004-09-29 Thread Najib Abi Fadel
Details: I have a table transactions_sco and a view transactions_sco_v defined as : create view transactions_sco_v as select * from transactions_sco; I have the following Rules: CREATE RULE transactions_sco_up1 AS ON UPDATE TO transactions_sco_v DO INSTEAD UPDATE transactions_sco SET traiter

Re: [GENERAL] Multiple Rules :: Postgres Is confused !!

2004-09-29 Thread Najib Abi Fadel
This means upd1 is redundant since any rows affected by upd1 *must* be affected by upd2. OK CREATE RULE transactions_sco_up8 AS ON UPDATE TO transactions_sco_v DO INSTEAD UPDATE transactions_sco SET traiter = new.traiter WHERE (transactions_sco.id = old.id); OK, this one just

Re: [GENERAL] pg_dump in cycle

2004-09-16 Thread Najib Abi Fadel
Use pg_dump instead of pg_dumpall example: pg_dump databaseName databaseDumpFile if u have many databases, you can make a script that dumps each database in it's own file - Original Message - From: Ilia Chipitsine [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday,

Re: [GENERAL] pg_dump in cycle

2004-09-16 Thread Najib Abi Fadel
U can use : select datname from pg_database; in order to get the list of databses HTH Najib. - Original Message - From: Ilia Chipitsine [EMAIL PROTECTED] To: Najib Abi Fadel [EMAIL PROTECTED] Sent: Thursday, September 16, 2004 10:41 AM Subject: Re: [GENERAL] pg_dump in cycle Use

Re: [GENERAL] pg_dump in cycle

2004-09-16 Thread Najib Abi Fadel
] To: Najib Abi Fadel [EMAIL PROTECTED] Sent: Thursday, September 16, 2004 10:41 AM Subject: Re: [GENERAL] pg_dump in cycle Use pg_dump instead of pg_dumpall example: pg_dump databaseName databaseDumpFile if u have many databases, you can make a script that dumps each database

Re: [GENERAL] pg_dump in cycle

2004-09-16 Thread Najib Abi Fadel
. - Original Message - From: Najib Abi Fadel [EMAIL PROTECTED] To: Ilia Chipitsine [EMAIL PROTECTED] Cc: generalpost [EMAIL PROTECTED] Sent: Thursday, September 16, 2004 12:08 PM Subject: Re: [GENERAL] pg_dump in cycle Check out the psql command. U can use : psql -l which outputs sometinhg

[GENERAL] function returning a readable representation of a number

2004-07-13 Thread Najib Abi Fadel
Is there any postgres function that do the following: select func(9123456789); 9 123 456 789 the function is given a number and it returns a "readable" string representation of the number seperating groups of 3 numbersby spaces. Thx

Re: [GENERAL] creating a complex aggregate function

2004-07-06 Thread Najib Abi Fadel
/2004;15/01/2004:12/02/2004; user2 I hope someone will help me in this issue. - Original Message - From: Najib Abi Fadel To: generalpost Cc: developPost Sent: Monday, July 05, 2004 12:23 PM Subject: [GENERAL] creating a complex aggregate function Hi i have

Re: [GENERAL] Bug in function to_char() !!

2004-07-06 Thread Najib Abi Fadel
You didn't answer the question though: what timezone are you using? Asia/Beirut If SHOW timezone produces something specific, that is the answer. If it says unknown then what you will need to do is work out Show timezone says unknown which of the files under /usr/share/zoneinfo is an exact

[GENERAL] dividing time ??

2004-06-29 Thread Najib Abi Fadel
Hi i have atable of dates let's say: 1/1/2004 8/1/2004 15/1/2004 29/1/2004 5/2/2004 12/2/2004 I am searching for a way to have the minimum date and maximum date for dates seperated byone week whitout gaps between them. which will give the followingoutput: 1/1/2004, 15/1/2004 29/1/2004 ,

Re: [GENERAL] virtual fields on VIEW?

2004-06-18 Thread Najib Abi Fadel
NOTE THAT if field2 or fieldA might contain NULL values u should use coalesce if u don't want to have a NULL value if one of the fields is NULL: If field2 and fieldA are strings you will have something like that (coalesce(t1.field2,'') ||coalesce(t2.fieldA,'')) AS stuff [EMAIL PROTECTED]

Re: [GENERAL] SQL query not returning the value expected !!!!!!!!!!!!!!!!!!

2003-11-11 Thread Najib Abi Fadel
thanx this was the problem : the null values - Original Message - From: Stephan Szabo [EMAIL PROTECTED] To: Najib Abi Fadel [EMAIL PROTECTED] Cc: generalpost [EMAIL PROTECTED] Sent: Monday, November 10, 2003 07:58 PM Subject: Re: [GENERAL] SQL query not returning the value expected

[GENERAL] SQL query not returning the value expected !!!!!!!!!!!!!!!!!!

2003-11-10 Thread Najib Abi Fadel
Hi ifyou take a look at the following query's you can see that the third query should logically return043219but instead it's not returning any rows ?? What's happening ?? dragon= SELECT cod_etu from parcours_v where cod_etu = '043219';cod_etu-(0 rows) dragon= SELECT