[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 Layout

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: >

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

2006-09-17 Thread Najib Abi Fadel
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

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 n

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

2006-09-20 Thread Najib Abi Fadel
from, 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 solutio

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

2006-09-20 Thread Najib Abi Fadel
from, 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 solutio

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

2006-09-21 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 ?th

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

2006-09-24 Thread Najib Abi Fadel
TED]> 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 u

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

2006-09-27 Thread Najib Abi Fadel
ystem and when (the time of the day) the load reaches maximum.> > 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

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

2006-09-27 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 tabl

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, bo

[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.

[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 d

[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, 200

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 -d DataBaseName -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     -

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]

[GENERAL] The Best Postgresql Load Balancing Solution

2006-09-14 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] 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]

[GENERAL] dividing time ??

2004-06-29 Thread Najib Abi Fadel
Hi i have a table 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 by one week whitout gaps between them. which will give the following output: 1/1/2004 , 15/1/2004 29/1/2

Re: [GENERAL] creating a complex aggregate function

2004-07-06 Thread Najib Abi Fadel
29/01/2004:12/02/2004;    user1 25/12/2003:01/01/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] creat

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

[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 numbers by spaces.   Thx

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, Se

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

2004-09-16 Thread Najib Abi Fadel
t; <[EMAIL PROTECTED]> To: "Najib Abi Fadel" <[EMAIL PROTECTED]> Cc: "generalpost" <[EMAIL PROTECTED]> Sent: Thursday, September 16, 2004 11:01 AM Subject: Re: [GENERAL] pg_dump in cycle > yes, but how can I integrate that query with shell script (which will

Re: [GENERAL] pg_dump in cycle

2004-09-16 Thread Najib Abi Fadel
ers. Najib. - 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 > > Ch

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 database you can use the coalesce function which replaces the Null value by zero (or any specified value in the second argument) :   select (coalesce(m1,0) + coalesce(m2,0) + ... +coales

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

2004-09-29 Thread Najib Abi Fadel
Hi all i am running PostgreSQL 7.3.2,   i have a VIEW for which i implemented multiple RULES 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

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 trait

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 on

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

2004-09-29 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=

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

2003-11-10 Thread Najib Abi Fadel
Hi if you take  a look at the following query's you can see that the third query should logically return  043219but 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=> S

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 Su