[GENERAL] Shared Buffers

2009-03-02 Thread Siddharth Shah
Hello All, How Postgres Maintains data in Shared Buffer Does It maintains queried data in memory or table data and Next time how postgres fetch data from memory rather than disk Which algorithm is used for storing data how data is indexed in shared buffers Thanks Siddharth

Re: [GENERAL] Shared Buffers

2009-03-02 Thread Ashish Karalkar
Siddharth Shah wrote: Hello All, How Postgres Maintains data in Shared Buffer Does It maintains queried data in memory or table data and Next time how postgres fetch data from memory rather than disk Which algorithm is used for storing data how data is indexed in shared buffers Thanks Sidd

Re: [GENERAL] Shared Buffers

2009-03-02 Thread Grzegorz Jaśkiewicz
On Mon, Mar 2, 2009 at 1:31 PM, Ashish Karalkar wrote: > Take a look at > > http://www.westnet.com/~gsmith/content/postgresql/InsideBufferCache.pdf > > http://postgresql.mirrors-r-us.net/files/documentation/books/aw_pgsql/hw_performance/node3.html Wouldn't it be nice, to have any presentation's

[GENERAL] Matching against a field case in-sensitive.

2009-03-02 Thread James Dooley
Hi, Since PostgreSQL is by default case sensitive, I would like to know if it is possible to do a search or somehow set the column in a relation to be case insensitive (on search at least). I would however like to store it case sensitive so I can display it as it was stored. Ps. I am not interes

Re: [GENERAL] Matching against a field case in-sensitive.

2009-03-02 Thread Serge Fonville
Hi, Since PostgreSQL is by default case sensitive, I would like to know if it is > possible to do a search or somehow set the column in a relation to be case > insensitive (on search at least). > > I would however like to store it case sensitive so I can display it as it > was stored. > PostgreS

Re: [GENERAL] Shared Buffers

2009-03-02 Thread Gauthier, Dave
I believe that op system side buffering can play a role too. I our case, the DB server (machine & op sys) caches data that it pulled from disk (not necessarily from a DB) and also the disk servers do the same. If a block was removed from the DB buffer cache to accommodate more recently request

Re: [GENERAL] Matching against a field case in-sensitive.

2009-03-02 Thread A. Kretschmer
In response to James Dooley : > Hi, > > Since PostgreSQL is by default case sensitive, I would like to know if it is > possible to do a search or somehow set the column in a relation to be case > insensitive (on search at least). > > I would however like to store it case sensitive so I can displa

Re: [GENERAL] Matching against a field case in-sensitive.

2009-03-02 Thread Martin Gainty
KEYWORDS: Identifier and key word names are case insensitive. Therefore UPDATE MY_TABLE SET A = 5; can equivalently be written as uPDaTE my_TabLE SeT a = 5; IDENTIFIERS: Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case. For example

Re: [GENERAL] Matching against a field case in-sensitive.

2009-03-02 Thread Reid Thompson
James Dooley wrote: Hi, Since PostgreSQL is by default case sensitive, I would like to know if it is possible to do a search or somehow set the column in a relation to be case insensitive (on search at least). I would however like to store it case sensitive so I can display it as it was sto

[GENERAL] Detemine database size on Postgres 8.0

2009-03-02 Thread Thom Brown
Hi all, We have a database server which is on version 8.0.12. I was wondering if anyone knows of a way to tell the size of each database? I've tried: select pg_size_pretty(pg_database_size('test')); which doesn't work because pg_database_size is unrecognised. And I've tried: select * from

Re: [GENERAL] encoding of PostgreSQL messages

2009-03-02 Thread Hiroshi Saito
Hi. Sorry very late reaction. I desire problem solution.Therefore, one evidence I tried jdbc program. http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/connect_problem/jdbctestx.java C:\home\HIROSHI>java jdbctestx org.postgresql.util.PSQLException: FATAL: ???[??"postgres"??

[GENERAL] plpython large result set

2009-03-02 Thread K D
Hello, I am hoping to use plpython to perform various transforms on query results of very large size. The documentation in the official 8.3 manual makes it appear as if the results of plpy.execute are read in at once (e.g., they appear to have random access and are mutable) rather than in the hid

[GENERAL] Non-Fun with SSHA Password scheme

2009-03-02 Thread Chris Browne
I have been trying to set up pl/pgsql code to generate and evaluate {SSHA} passwords, with somewhat limited success. {SSHA} is a password scheme that uses SHA-1 along with salting to ward off dictionary attacks. Apparently it's used quite a bit with LDAP. There does not seem to be a "claimed aut

Re: [GENERAL] Detemine database size on Postgres 8.0

2009-03-02 Thread Scott Marlowe
On Mon, Mar 2, 2009 at 8:25 AM, Thom Brown wrote: > Hi all, > > We have a database server which is on version 8.0.12.  I was wondering if > anyone knows of a way to tell the size of each database? Back in the olden days when I was on 8.0 I would just use du -sh to find out. sudo su - postgres cd

Re: [GENERAL] Stalled post to pgsql-general

2009-03-02 Thread K D
will post to proper group, sorry On Mon, Mar 2, 2009 at 8:10 AM, wrote: > Your message to pgsql-general has been delayed, and requires the approval > of the moderators, for the following reason(s): > > The author (K D ) > is not a member of any of the restrict_post groups. > > If you do not wis

[GENERAL] plpgsql: UPDATE...Returning in FOR loop

2009-03-02 Thread Raymond O'Donnell
Hi all, I'm wondering if it's possible to use UPDATE...RETURNING, instead of SELECT, in a FOR loop like this: for rec in update recipients set batch_id = TheID where recip_id = any ( select recip_id from recipients where msg_id = TheMessage and recip_type = TheType and batch_i

Re: [GENERAL] plpgsql: UPDATE...Returning in FOR loop

2009-03-02 Thread Tom Lane
"Raymond O'Donnell" writes: > I'm wondering if it's possible to use UPDATE...RETURNING, instead of > SELECT, in a FOR loop like this: > ... > I'm guessing that this isn't possible, because when I try it I get the > following error: > gti_messaging=> select recipients_for_delivery(5, 'Email', 20);

Re: [GENERAL] plpgsql: UPDATE...Returning in FOR loop

2009-03-02 Thread Sam Mason
On Mon, Mar 02, 2009 at 07:34:55PM +, Raymond O'Donnell wrote: > when I try it I get the following error: I've never tried doing things like this before, but it looks as though everything is working. I'd interpret your error message: > gti_messaging=> select recipients_for_delivery(5, 'Email

Re: [GENERAL] plpgsql: UPDATE...Returning in FOR loop

2009-03-02 Thread Raymond O'Donnell
On 02/03/2009 20:19, Tom Lane wrote: > Well, that has nothing to do with UPDATE RETURNING; it's apparently > failing here: > >> rec recipients; > > I suppose "recipients" is a composite type one of whose columns is of a > NOT NULL domain. Best advice is "don't do that" --- not-null domains T

Re: [GENERAL] How to pipe the psql copy command to Unix 'Date' command

2009-03-02 Thread SHARMILA JOTHIRAJAH
--- On Thu, 2/19/09, Erik Jones wrote: > From: Erik Jones > Subject: Re: [GENERAL] How to pipe the psql copy command to Unix 'Date' > command > To: "R Smith" <4otherbusin...@comcast.net> > Cc: "General postgres mailing list" > Date: Thursday, February 19, 2009, 11:08 PM > On Feb 19, 2009,

[GENERAL] php4 and postgresql 8.3

2009-03-02 Thread shadrack
My basic question is...are php4 and postgresql 8.3 compatible? I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3. I know, some of those versions are old...its government, and I unfortunately don't have control over the version. In fact, I don't even have root access right now. But I'v

Re: [GENERAL] How to pipe the psql copy command to Unix 'Date' command

2009-03-02 Thread John R Pierce
SHARMILA JOTHIRAJAH wrote: Is it possible to sent this 'time' output to a file... If I try time cmd1 someargs1 | cmd2 someargs2 > output.log it doesn't sent the "time" to the file... time (cmd1 someargs1 | cmd2 someargs2) > output.log the way you had it, it was only timing cmd1. with the

Re: [GENERAL] Detemine database size on Postgres 8.0

2009-03-02 Thread Greg Smith
On Mon, 2 Mar 2009, Scott Marlowe wrote: Back in the olden days when I was on 8.0 I would just use du -sh to find out. and match them up. yeah, I had a script that made it prettier but that worked fine. Not sure what version I started using this trick on: SELECT relfilenode, relpages * 8 AS

Re: [GENERAL] How to pipe the psql copy command to Unix 'Date' command

2009-03-02 Thread Alan Hodgson
On Monday 02 March 2009, John R Pierce wrote: > SHARMILA JOTHIRAJAH wrote: > > Is it possible to sent this 'time' output to a file... > > If I try > > time cmd1 someargs1 | cmd2 someargs2 > output.log > > > > it doesn't sent the "time" to the file... > > time (cmd1 someargs1 | cmd2 someargs2) > ou

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread Alan Hodgson
On Monday 02 March 2009, shadrack wrote: > My basic question is...are php4 and postgresql 8.3 compatible? > I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3. I know, > some of those versions are old...its government, and I unfortunately > don't have control over the version. In fact,

[GENERAL] Log en Postgresql 8.1.11

2009-03-02 Thread Angelo Astorga
Trabajo con postgresql 7.3.4 y el log se guarda en el dir .../data/serverlog, ahora que utilizo postgresql 8.1.11 no encuentro donde guarda el log, alguna ayuda de como generar archivo log de postgresql... aastorga

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread Scott Marlowe
On Mon, Mar 2, 2009 at 4:33 PM, shadrack wrote: > My basic question is...are php4 and postgresql 8.3 compatible? > I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know, You should be fine. PostgreSQL 8.3 will answer most older pgsql clients coming from the server just fine, so y

[GENERAL] how to use pg_dump to dump tables whose owner is me

2009-03-02 Thread Roger Chen
Hi, Can anyone tell me how to do that? I could find that in man page of pg_dump. Thanks. Best, Roger -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread Tom Lane
shadrack writes: > My basic question is...are php4 and postgresql 8.3 compatible? > I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3. I know, > some of those versions are old...its government, and I unfortunately > don't have control over the version. Er ... Red Hat *what*? I don't

Re: [GENERAL] PostgreSQL clustering with DRBD

2009-03-02 Thread Tim Uckun
> > I think I start to have an idea about what the best suitable solution is > for my situation. > I was hoping there would be some sort of patch for the PostgreSQL download > instead of an entire rebuild of the sources. > > I'll post any updates I find. > Hey Serge. Any update on this? I can't

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread Scott Marlowe
On Mon, Mar 2, 2009 at 6:29 PM, Shad Keene wrote: > We already have the postgresql installed and its working fine but I can't > communicate with it using php4 that's installed. I can't find the php-pgsql > module or the pgsql.so in php.ini.  So I'm getting an error on pg_connect. > Any suggestions

Re: [GENERAL] Log en Postgresql 8.1.11

2009-03-02 Thread Fernando Moreno
El día 2 de marzo de 2009 18:14, Angelo Astorga escribió: > Trabajo con postgresql 7.3.4 y el log se guarda en el dir > .../data/serverlog, ahora que utilizo postgresql 8.1.11 no encuentro donde > guarda el log, alguna ayuda de como generar archivo log de postgresql... > > aastorga Esta es la lis

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread Shad Keene
We already have the postgresql installed and its working fine but I can't communicate with it using php4 that's installed. I can't find the php-pgsql module or the pgsql.so in php.ini. So I'm getting an error on pg_connect. Any suggestions on what to do from here? Can I simply download php-pg

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread John R Pierce
Tom Lane wrote: shadrack writes: My basic question is...are php4 and postgresql 8.3 compatible? I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3. I know, some of those versions are old...its government, and I unfortunately don't have control over the version. Er ... Red H

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread Scott Marlowe
On Mon, Mar 2, 2009 at 6:35 PM, John R Pierce wrote: > Tom Lane wrote: >> >> shadrack writes: >> >>> >>> My basic question is...are php4 and postgresql 8.3 compatible? >>> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know, >>> some of those versions are old...its government, a

Re: [GENERAL] PostgreSQL clustering with DRBD

2009-03-02 Thread Scott Marlowe
On Mon, Feb 23, 2009 at 2:27 AM, Serge Fonville wrote: > Thanks all for the responses, >> >> We're very happy with pgpool-II for load-balancing and multi-master >> >> usage of PostgreSQL (keep in mind to enable HA for pgpool-II itself to >> >> avoid a SPOF, e.g. with heartbeat). > > I could not de

Re: [GENERAL] how to use pg_dump to dump tables whose owner is me

2009-03-02 Thread Scott Marlowe
On Mon, Mar 2, 2009 at 5:31 PM, Roger Chen wrote: > Hi, > Can anyone tell me how to do that? I could find that in man page of > pg_dump. Thanks. pg_dump -t table1 -t table2 ? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread Scott Marlowe
On Mon, Mar 2, 2009 at 4:33 PM, shadrack wrote: > My basic question is...are php4 and postgresql 8.3 compatible? > I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know, You do know that php4 is discontinued, right? No more bug fixes, no more security fixes. I hope you're having

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread John R Pierce
Shad Keene wrote: We already have the postgresql installed and its working fine but I can't communicate with it using php4 that's installed. I can't find the php-pgsql module or the pgsql.so in php.ini. So I'm getting an error on pg_connect. Any suggestions on what to do from here? Can I simp

[GENERAL] postgreSQL & amazon ec2 cloud

2009-03-02 Thread Sanjay Arora
Hello all Is it possible to host postgreSQL on Amazon's cloud? What are the issues involved? With best regards. Sanjay.

Re: [GENERAL] postgreSQL & amazon ec2 cloud

2009-03-02 Thread John R Pierce
Sanjay Arora wrote: Hello all Is it possible to host postgreSQL on Amazon's cloud? What are the issues involved? in theory, sure. anything is possible. in practice, as I understand it from my relatively superficial reading, fast storage is fairly expensive and limited in the EC2 compute c

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread John R Pierce
Scott Marlowe wrote: On Mon, Mar 2, 2009 at 8:44 PM, John R Pierce wrote: (or maybe its -u, I forget) should take care of the php part. this will, however, try and load the RHEL 3.x libpq.so, which was built for rh_postgresql 7.3.3, a very very ancient version of postgresql, and its very u

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread Scott Marlowe
On Mon, Mar 2, 2009 at 8:44 PM, John R Pierce wrote: > (or maybe its -u, I forget) should take care of the php part.   this will, > however, try and load the RHEL 3.x libpq.so, which was built for > rh_postgresql 7.3.3, a very very ancient version of postgresql, and its very > unclear if this will

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread shadrack
On Mar 2, 5:35 pm, pie...@hogranch.com (John R Pierce) wrote: > Tom Lane wrote: > > shadrack writes: > > >> My basic question is...are php4 and postgresql 8.3 compatible? > >> I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3.  I know, > >> some of those versions are old...its governmen