Re: [GENERAL] problem with a conditional statement

2007-05-09 Thread Albe Laurenz
Kirk Wythers wrote: I am struggling to get a CASE WHEN statement to work within another CASE WHEN. Here is my original code: SELECT CASE WHEN w.station_id = site_near.station_id THEN w.obs_id ELSE s.obs_id END AS obs_id, site_near.station_id, site_near.longname, w.year, w.doy, w.precip,

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Andrej Ricnik-Bay
On 5/9/07, Ashish Karalkar [EMAIL PROTECTED] wrote: Hello All, Hi, Can anybody please point me to Advantages and Disadvantages of using view The most obvious advantage (for me, anyway) is to restrict which columns a user can see in a table. I'm sure there are others. With Regards

Re: [GENERAL] Spliting a string in plpgsql

2007-05-09 Thread Albe Laurenz
Jasbinder Singh Bali [EMAIL PROTECTED] schrieb: I'm writing a function in plpgsql and i need to do the following: I have a string in the following format. mail.yahoo.com In this string, i need to figure out the number of dots in it and split the string into two on last but one dot.

Re: [GENERAL] Building Pg 8.2.4 on AIX 5.3 doesn't produce shared libs?

2007-05-09 Thread Albe Laurenz
Sic Transit Gloria Mundi writes: I would like to use Perl, DBI, and DBD::Pg on AIX. As I understand it, I need a shared lib version of the client libs for this. When building on AIX5.3 ML04 (powerpc_power5, 64 bit), it seems only the static libraries are built. This seems true with

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ashish Karalkar
Thanks Andrej for your replay I have found out some of them n are as follows, but I want more reasons for not using views . I only got one Advantages: 1) Permission to user can be given to access the database only through view containing specific data the user is authorized to see

[GENERAL] backup and restore

2007-05-09 Thread anhtin
hi all I am developing web site use database is PostGres and now i must build function backup and Restore database on Web My web develop on framework 2.0(asp.net 2.0) I know have two file on forder bin use backup and restore is: pg_restore.exe , pg_dump.exe I have plan is write function or

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ashish Karalkar
Thanks Brent for your replay, What about the Disadvantages, Performance issues? With Regards Ashish... - Original Message - From: [EMAIL PROTECTED] To: Postgres General pgsql-general@postgresql.org Cc: Ashish Karalkar [EMAIL PROTECTED] Sent: Wednesday, May 09, 2007 1:24 PM

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/07 02:16, Ashish Karalkar wrote: [snip] Disadvantages: 1) Performance : If a view is defined by complex multitable query,then simple query against that view becomes a coplecated join, and it may take a long time to complete I

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Andrej Ricnik-Bay
On 5/9/07, Ron Johnson [EMAIL PROTECTED] wrote: 1) Performance : If a view is defined by complex multitable query,then simple query against that view becomes a coplecated join, and it may take a long time to complete I don't see that as relevant, since we know which objects are tables

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ashish Karalkar
Thanks All for your replies, But then dont we have any disadvantage of using View??? With Reagrds Ashish... - Original Message - From: Andrej Ricnik-Bay [EMAIL PROTECTED] To: Ron Johnson [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Sent: Wednesday, May 09, 2007 2:03 PM

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ragnar
On mið, 2007-05-09 at 12:46 +0530, Ashish Karalkar wrote: I have found out some of them n are as follows, but I want more reasons for not using views . I only got one Disadvantages: 1) Performance : If a view is defined by complex multitable query,then simple query against that

Re: [GENERAL] PG on Debian 4.0.x ?

2007-05-09 Thread Peter Eisentraut
Am Dienstag, 8. Mai 2007 18:09 schrieb Andreas: Do you know where I find PG 8.2.4 and pgAdmin 1.6.3 binaries for Debian 4.0.x ? Right now you can't, at least not from official or semiofficial sources. I expect in a few weeks time, backports will show up on backports.org. -- Peter Eisentraut

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/07 03:36, Ashish Karalkar wrote: Thanks All for your replies, But then dont we have any disadvantage of using View??? You can't insert into multi-table views. - -- Ron Johnson, Jr. Jefferson LA USA Give a man a fish, and he eats for a

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ashish Karalkar
Ok. That is on insert update delete part. ant disadvantage on select part? With Regards Ashish... - Original Message - From: Ron Johnson [EMAIL PROTECTED] To: pgsql-general@postgresql.org Sent: Wednesday, May 09, 2007 2:18 PM Subject: Re: [GENERAL] Views- Advantages and Disadvantages

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/07 03:48, Ashish Karalkar wrote: Ok. That is on insert update delete part. ant disadvantage on select part? Performance-wise? No. Both an advantage and disadvantage of views is that it codifies certain queries in the database. P.S. -

[GENERAL] typical schema for a forum?

2007-05-09 Thread Louis-David Mitterrand
Hi, I'm trying to implement a forum with mason and postgresql. What is the typical database schema of a forum (threaded or flat) application? Thanks, ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] backup and restore

2007-05-09 Thread Hannes Dorbath
On 09.05.2007 09:45, anhtin wrote: hi all I am developing web site use database is PostGres and now i must build function backup and Restore database on Web My web develop on framework 2.0(asp.net 2.0) I know have two file on forder bin use backup and restore is: pg_restore.exe , pg_dump.exe I

Re: [GENERAL] PG on Debian 4.0.x ?

2007-05-09 Thread Hannes Dorbath
On 09.05.2007 10:43, Peter Eisentraut wrote: Right now you can't, at least not from official or semiofficial sources. I expect in a few weeks time, backports will show up on backports.org. .. and this is what people consider `stable' then? Hacked versions of applications somehow made to work

Re: [GENERAL] pg_contraint: 'action code' ?

2007-05-09 Thread Felix Kater
On Tue, 08 May 2007 10:03:24 -0400 Tom Lane [EMAIL PROTECTED] wrote: * the FKCONSTR_MATCH_xxx constants defined in parsenodes.h. True! ;-) Thank you so much. Felix ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] are foreign keys realized as indexes?

2007-05-09 Thread Felix Kater
On Tue, 8 May 2007 15:54:08 +0200 Martijn van Oosterhout [EMAIL PROTECTED] wrote: A unique index is not a substitute for a unique constraint, they're exactly the same thing. If you drop your constraint and create a unique index, you're back where you started. You neither added nor removed

Re: [GENERAL] backup and restore

2007-05-09 Thread anhtin
thanks reply for me but have propblem: the function pg_start_backup() i dont run this function Can u send me example is a procedure or function can backup and restore for me -- View this message in context: http://www.nabble.com/backup-and-restore-tf3714247.html#a10391372 Sent from the

Re: [GENERAL] PG on Debian 4.0.x ?

2007-05-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/07 04:33, Hannes Dorbath wrote: On 09.05.2007 10:43, Peter Eisentraut wrote: Right now you can't, at least not from official or semiofficial sources. I expect in a few weeks time, backports will show up on backports.org. .. and this

Re: [GENERAL] typical schema for a forum?

2007-05-09 Thread PFC
I have written a little PHP+postgres forum for benchmarking purposes, to see how fast postgres could go. It has basic forum features, like forums (duh), topics, posting, pagination, watching topics, topic post count, display newest topic and post in topic forum pages, templates, topics

Re: [GENERAL] PG on Debian 4.0.x ?

2007-05-09 Thread Dimitri Fontaine
Le mardi 08 mai 2007, Andreas a écrit : Do you know where I find PG 8.2.4 and pgAdmin 1.6.3 binaries for Debian 4.0.x ? For server-side debian stable, you can build yourself the package by simply following those steps : 1. have your deb-src line (from /etc/apt/sources.list) point to sid 2.

[GENERAL] Solaris Postgresql 8.1.8 vs Postgresql 8.2.4

2007-05-09 Thread Simon Smith
I am planning to set up a new solaris 10 sparc server with a postgresql database. It looks like solaris 10 comes with version 8.1.8 of postgres. Is there any benefit in using the 8.1.8 included solaris version over the current release. The sun site mentions several enhancement to the solaris

Re: [GENERAL] Dangers of fsync = off

2007-05-09 Thread Joel Dice
Thanks for your response, Andrew. On Tue, 8 May 2007, Andrew Sullivan wrote: On Fri, May 04, 2007 at 08:54:10AM -0600, Joel Dice wrote: My next question is this: what are the dangers of turning fsync off in the context of a high-availablilty cluster using asynchronous replication? My real

Re: [GENERAL] PostgreSql embedded available?

2007-05-09 Thread Austin Winstanley
Thanks for the replies and help everyone... On 5/8/07, Rich Shepard [EMAIL PROTECTED] wrote: On Tue, 8 May 2007, Scott Marlowe wrote: Is there a version of PostgreSql that can be embedded with an application? Nope, and it's not real likely to happen. Take a look at sqllite. Yes,

[GENERAL] Problem with data corruption and psql memory usage

2007-05-09 Thread Gerhard Wiesinger
Hello! I'm new to Postgresql and I did make some import with about 2.8 Mio with normal insert commands. Config was (difference from default config): listen_addresses = '*' temp_buffers = 20MB# min 800kB work_mem = 20MB# min 64kB

[GENERAL] User restrictions

2007-05-09 Thread ebmb
Hi all, how can I make user restrictions to commands like \du; \l; \dn. Is it possible??? Thanks in advance! EBMB. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] Issue with database Postgresql :(

2007-05-09 Thread Gerard M
Hello dear postgres community, I'm having a bad time with an issue that I haven't been able to solve with my database, the problem is this: Whenever I try to save a word containing special characters in it (for example áéíóú) I get the following django error: invalid byte sequence for encoding

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread woodb
On 5/9/07, Ashish Karalkar [EMAIL PROTECTED] wrote: Hello All, Can anybody please point me to Advantages and Disadvantages of using view Hi Ashish, There are several, but they are generally about implementing a more user friendly database from a well normalised structure. You can use

Re: [GENERAL] Dangers of fsync = off

2007-05-09 Thread Bill Moran
In response to Joel Dice [EMAIL PROTECTED]: Thanks for your response, Andrew. On Tue, 8 May 2007, Andrew Sullivan wrote: On Fri, May 04, 2007 at 08:54:10AM -0600, Joel Dice wrote: My next question is this: what are the dangers of turning fsync off in the context of a

Re: [GENERAL] Issue with database Postgresql :(

2007-05-09 Thread Peter Eisentraut
Am Dienstag, 8. Mai 2007 19:20 schrieb Gerard M: Whenever I try to save a word containing special characters in it (for example áéíóú) I get the following django error: invalid byte sequence for encoding UTF8: 0xe92020 HINT: This error can also happen if the byte sequence does not match the

Re: [GENERAL] Dangers of fsync = off

2007-05-09 Thread Csaba Nagy
[snip] Take the example of a query UPDATE tablename SET x = x + 1. When this query is erroneously issued twice, data corruption will occur. Huh ? I thought slony is replicating data, not queries... what on the master is UPDATE tablename SET x = x + 1 will translate to UPDATE tablename SET x =

Re: [GENERAL] Dangers of fsync = off

2007-05-09 Thread Bill Moran
In response to Csaba Nagy [EMAIL PROTECTED]: [snip] Take the example of a query UPDATE tablename SET x = x + 1. When this query is erroneously issued twice, data corruption will occur. Huh ? I thought slony is replicating data, not queries... what on the master is UPDATE tablename SET x =

[GENERAL] In theory question

2007-05-09 Thread Naz Gassiep
This may be a question for -hackers, but I don't like disturbing them unnecessarily. I've been having a look at memcached. I would like to ask, is there any reason that, theoretically, a similar caching system could be built right into the db serving daemon? I.e., the hash tables and libevent

Re: [GENERAL] PG on Debian 4.0.x ?

2007-05-09 Thread Alvaro Herrera
Dimitri Fontaine wrote: Le mardi 08 mai 2007, Andreas a écrit : Do you know where I find PG 8.2.4 and pgAdmin 1.6.3 binaries for Debian 4.0.x ? For server-side debian stable, you can build yourself the package by simply following those steps : 1. have your deb-src line (from

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Merlin Moncure
On 5/9/07, Ashish Karalkar [EMAIL PROTECTED] wrote: Thanks Brent for your replay, What about the Disadvantages, Performance issues [of views] Views are pretty much neutral from a performance perspective. There are certain small considerations here and there to think about but you should

Re: [GENERAL] Dangers of fsync = off

2007-05-09 Thread Scott Ribe
I still wouldn't trust Slony with fsync off. Another scenario would be the Slony trigger writes a change to the Slony DB, the db crashes before it gets committed to disk. When the DB is started, no errors prevent startup, but that transaction is lost. I'm not sure, but I think the

Re: [GENERAL] are foreign keys realized as indexes?

2007-05-09 Thread Tom Lane
Felix Kater [EMAIL PROTECTED] writes: On Tue, 8 May 2007 15:54:08 +0200 Martijn van Oosterhout [EMAIL PROTECTED] wrote: A unique index is not a substitute for a unique constraint, they're exactly the same thing. Yes. For this reason I didn't have to implement *both* 'unique constraints'

Re: [GENERAL] In theory question

2007-05-09 Thread Michael Glaesemann
On May 9, 2007, at 9:13 , Naz Gassiep wrote: I've been having a look at memcached. I would like to ask, is there any reason that, theoretically, a similar caching system could be built right into the db serving daemon? This is all a bit above my head, but have you looked at pgmemcached?

[GENERAL] CentOS 5, pg8.4.2, could not read time zone file

2007-05-09 Thread Wade Hampton
On my CentOS 5.0 box with the RHEL version of Postgresql 8.4.2, the initial initdb step fails with the error WARNING: cold not read time zone file Default : permission denied. FATAL: invalid value for parameter timezone_abbreviations: Default A search of the mail list and google showed this

Re: [GENERAL] Problem with data corruption and psql memory usage

2007-05-09 Thread Tom Lane
Gerhard Wiesinger [EMAIL PROTECTED] writes: LOG: could not fsync segment 0 of relation 1663/16386/42726: Input/output error [ raised eyebrow... ] I think your machine is flakier than you believe. This error is particularly damning, but the general pattern of weird failures all over the place

Re: [GENERAL] PG on Debian 4.0.x ?

2007-05-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/07 09:13, Alvaro Herrera wrote: [snip] I tried it here and it didn't work because it only has packages for i386, and my system is amd64. However, I got it by source with Your build environment is somehow broken. The same deb-src should

Re: [GENERAL] PG on Debian 4.0.x ?

2007-05-09 Thread Alvaro Herrera
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/07 09:13, Alvaro Herrera wrote: [snip] I tried it here and it didn't work because it only has packages for i386, and my system is amd64. However, I got it by source with Your build environment is somehow

Re: [GENERAL] CentOS 5, pg8.4.2, could not read time zone file

2007-05-09 Thread Hannes Dorbath
On 09.05.2007 16:51, Wade Hampton wrote: On my CentOS 5.0 box with the RHEL version of Postgresql 8.4.2, the Hey, that's what I call bleeding edge ;) initial initdb step fails with the error WARNING: cold not read time zone file Default : permission denied. FATAL: invalid value for

Re: [GENERAL] In theory question

2007-05-09 Thread Hannes Dorbath
On 09.05.2007 16:13, Naz Gassiep wrote: This may be a question for -hackers, but I don't like disturbing them unnecessarily. I've been having a look at memcached. I would like to ask, is there any reason that, theoretically, a similar caching system could be built right into the db serving

Re: [GENERAL] CentOS 5, pg8.4.2, could not read time zone file

2007-05-09 Thread Tom Lane
Wade Hampton [EMAIL PROTECTED] writes: On my CentOS 5.0 box with the RHEL version of Postgresql 8.4.2, the initial initdb step fails with the error WARNING: cold not read time zone file Default : permission denied. FATAL: invalid value for parameter timezone_abbreviations: Default

Re: [GENERAL] problem with a conditional statement

2007-05-09 Thread Kirk Wythers
Here is a more elaborate version, I'm trying to add 'avgsol' to your original FROM clause: SELECT CASE WHEN w.station_id = site_near.station_id THEN w.obs_id ELSE s.obs_id END AS obs_id, site_near.station_id, site_near.longname, w.year, w.doy, w.precip, w.tmin, w.tmax, --replace missing

Re: [GENERAL] In theory question

2007-05-09 Thread Tom Lane
Naz Gassiep [EMAIL PROTECTED] writes: I.e., the hash tables and libevent could sit on top of postmaster as an optional component caching data on a per-query basis and only hitting the actual db in the event of a cache miss? How does the cache know when the database contents change?

Re: [GENERAL] problem with a conditional statement

2007-05-09 Thread Erik Jones
On May 9, 2007, at 10:32 AM, Kirk Wythers wrote: Here is a more elaborate version, I'm trying to add 'avgsol' to your original FROM clause: SELECT CASE WHEN w.station_id = site_near.station_id THEN w.obs_id ELSE s.obs_id END AS obs_id, site_near.station_id, site_near.longname, w.year,

Re: [GENERAL] PITR and tar

2007-05-09 Thread Dhaval Shah
Looks like a problem specific to FreeBSD. I use Centos/postgres 8.2.3 and I do not see that problem at all. Dhaval On 5/8/07, Jeff Davis [EMAIL PROTECTED] wrote: On Tue, 2007-05-08 at 13:24 -0400, Merlin Moncure wrote: On 5/8/07, Jeff Davis [EMAIL PROTECTED] wrote: On Tue, 2007-05-08 at

Re: [GENERAL] Problem with data corruption and psql memory usage

2007-05-09 Thread Gerhard Wiesinger
Hello Tom! I don't think this is a hardware problem. Machine runs 24/7 for around 4 years without any problems, daily backup with GBs of data to it, uptimes to the next kernel security patch, etc. The only problem I could believe is: I'm running the FC7 test packages of postgresql in FC6 and

Re: [GENERAL] Problem with data corruption and psql memory usage

2007-05-09 Thread Tom Lane
Gerhard Wiesinger [EMAIL PROTECTED] writes: The only problem I could believe is: I'm running the FC7 test packages of postgresql in FC6 and maybe there is a slight glibc library conflict or any other incompatibility. Hmm, I'd be suspicious of that too. You'd be well advised to take the FC7

Re: [GENERAL] problem with a conditional statement

2007-05-09 Thread Kirk Wythers
On May 9, 2007, at 10:41 AM, Erik Jones wrote: On May 9, 2007, at 10:32 AM, Kirk Wythers wrote: Here is a more elaborate version, I'm trying to add 'avgsol' to your original FROM clause: SELECT CASE WHEN w.station_id = site_near.station_id THEN w.obs_id ELSE s.obs_id END AS obs_id,

Re: [GENERAL] PITR and tar

2007-05-09 Thread Jim Nasby
Actually, looking at the docs, the problem is with some versions of GNU tar. AFAIK bsdtar is perfectly happy to archive files that have changed from underneath it. On May 9, 2007, at 10:45 AM, Dhaval Shah wrote: Looks like a problem specific to FreeBSD. I use Centos/postgres 8.2.3 and I do

Re: [GENERAL] CentOS 5, pg8.4.2, could not read time zone file

2007-05-09 Thread Wade Hampton
On 5/9/07, Tom Lane [EMAIL PROTECTED] wrote: Wade Hampton [EMAIL PROTECTED] writes: On my CentOS 5.0 box with the RHEL version of Postgresql 8.4.2, the initial initdb step fails with the error WARNING: cold not read time zone file Default : permission denied. FATAL: invalid value for

Re: [GENERAL] CentOS 5, pg8.4.2, could not read time zone file

2007-05-09 Thread Wade Hampton
The build of rhel src rpm failed due to This platform is not thread safe. Check the file 'config.lg' fo rthe exact reason. For now I am going back to 8.1.8 that came with CentOS 5. Thanks, -- Wade Hampton ---(end of broadcast)--- TIP 2: Don't

Re: [GENERAL] PITR and tar

2007-05-09 Thread Jeff Davis
On Wed, 2007-05-09 at 11:40 -0500, Jim Nasby wrote: Actually, looking at the docs, the problem is with some versions of GNU tar. AFAIK bsdtar is perfectly happy to archive files that have changed from underneath it. $ tar --version bsdtar 1.2.53 - libarchive 1.3.1 That fails to create a

Re: [GENERAL] In theory question

2007-05-09 Thread Naz Gassiep
Hannes Dorbath wrote: I think this is close to what MySQL's query cache does. The question is if this should be the job of the DBMS and not another layer. At least the pgmemcache author and I think that it's better done outside the DBMS. See

Re: [GENERAL] In theory question

2007-05-09 Thread Joshua D. Drake
Naz Gassiep wrote: Hannes Dorbath wrote: I think this is close to what MySQL's query cache does. The question is if this should be the job of the DBMS and not another layer. At least the pgmemcache author and I think that it's better done outside the DBMS. See

Re: [GENERAL] In theory question

2007-05-09 Thread Naz Gassiep
This is exactly what I was asking about. So my theoretical idea has already been implemented. Now if only *all* my ideas were done for me by the time I came up with them :) Then you wouldn't be able to eventually patent them ;) What an un-BSD licensish thing to say :P

Re: [GENERAL] CentOS 5, pg8.4.2, could not read time zone file

2007-05-09 Thread Tom Lane
Wade Hampton [EMAIL PROTECTED] writes: On 5/9/07, Tom Lane [EMAIL PROTECTED] wrote: Anyway, having been burnt before I always wonder about SELinux whenever any strange permission failures turn up on recent RHEL/Fedora systems. SELinux is off and there were no avc denied messages in

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ilan Volow
On May 9, 2007, at 4:36 AM, Ashish Karalkar wrote: Thanks All for your replies, But then dont we have any disadvantage of using View??? With Reagrds Ashish... I once inherited a database that made extensive use of constants in views (a la magic numbers) as well as had several

Re: [GENERAL] In theory question

2007-05-09 Thread PFC
This may be a question for -hackers, but I don't like disturbing them unnecessarily. I've been having a look at memcached. I would like to ask, is there any reason that, theoretically, a similar caching system could be built right into the db serving daemon? I.e., the hash tables and libevent

[GENERAL] re Referential Integrity Flash Tutorial

2007-05-09 Thread Lou O'Quin
I have recommended many, many folks to the referential integrity flash tutorial that was posted in the old tech docs, whether ot not they were using PostgreSQL. Does anyone know where the tutorial was moved to??? the old address was

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Dann Corbit
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Ashish Karalkar Sent: Wednesday, May 09, 2007 1:36 AM To: Andrej Ricnik-Bay; Ron Johnson Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Views- Advantages and Disadvantages

Re: [GENERAL] Audit-trail engine: getting the application's layer user_id

2007-05-09 Thread Marcelo de Moraes Serpa
Hi Manuel, Just replying to say a big thank you ... I compiled the C extension with the code you , did all the necessary logic and finally solved it. Thank you very much for your help! Thank you also to all the other who helped me! Marcelo. On 4/24/07, Manuel Sugawara [EMAIL PROTECTED] wrote:

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Michael Glaesemann
On May 9, 2007, at 14:02 , Dann Corbit wrote: Views can hide important information from the optimizer (especially index information). Really? AIUI, views—at least in PostgreSQL—are implemented using PostgreSQL's rule system: the entire query is rewritten to include the view query, and

Re: [GENERAL] Audit-trail engine: getting the application's layer user_id

2007-05-09 Thread Tilmann Singer
* Marcelo de Moraes Serpa [EMAIL PROTECTED] [20070509 21:14]: Just replying to say a big thank you ... I compiled the C extension with the code you , did all the necessary logic and finally solved it. Thank you very much for your help! I second that! I finally settled with the simpler

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Dann Corbit
-Original Message- From: Michael Glaesemann [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 09, 2007 12:14 PM To: Dann Corbit Cc: Ashish Karalkar; Andrej Ricnik-Bay; Ron Johnson; pgsql- [EMAIL PROTECTED] Subject: Re: [GENERAL] Views- Advantages and Disadvantages On May 9, 2007,

Re: [GENERAL] User restrictions

2007-05-09 Thread John DeSoi
On May 8, 2007, at 1:10 PM, ebmb wrote: how can I make user restrictions to commands like \du; \l; \dn. Is it possible??? No. If you a user connect directly to the database, they can query the system catalogs. So even if you somehow disabled the psql command, they could still execute

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Joshua D. Drake
Dann Corbit wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Ashish Karalkar Sent: Wednesday, May 09, 2007 1:36 AM To: Andrej Ricnik-Bay; Ron Johnson Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Views- Advantages and

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Joshua D. Drake
Views can hide important information from the optimizer (especially index information). Really? AIUI, views-at least in PostgreSQL-are implemented using PostgreSQL's rule system: the entire query is rewritten to include the view query, and the optimizer sees the rewritten query. What the

Re: [GENERAL] Dangers of fsync = off

2007-05-09 Thread Brad Nicholson
On Wed, 2007-05-09 at 08:26 -0600, Scott Ribe wrote: I still wouldn't trust Slony with fsync off. Another scenario would be the Slony trigger writes a change to the Slony DB, the db crashes before it gets committed to disk. When the DB is started, no errors prevent startup, but that

Re: [GENERAL] Problem with data corruption and psql memory usage

2007-05-09 Thread Scott Marlowe
On Wed, 2007-05-09 at 11:18, Gerhard Wiesinger wrote: Hello Tom! I don't think this is a hardware problem. Machine runs 24/7 for around 4 years without any problems, daily backup with GBs of data to it, uptimes to the next kernel security patch, etc. The only problem I could believe is:

Re: [GENERAL] In theory question

2007-05-09 Thread Karsten Hilbert
On Wed, May 09, 2007 at 10:29:02AM -0700, Joshua D. Drake wrote: This is exactly what I was asking about. So my theoretical idea has already been implemented. Now if only *all* my ideas were done for me by the time I came up with them :) Then you wouldn't be able to eventually patent them

Re: [GENERAL] In theory question

2007-05-09 Thread Joshua D. Drake
Karsten Hilbert wrote: On Wed, May 09, 2007 at 10:29:02AM -0700, Joshua D. Drake wrote: This is exactly what I was asking about. So my theoretical idea has already been implemented. Now if only *all* my ideas were done for me by the time I came up with them :) Then you wouldn't be able to

[GENERAL] WAL file internals and why a 64 bit will not work on a 32 bit

2007-05-09 Thread Dhaval Shah
I do know that WAL files taken from a 64 bit OS will not work on a 32 bit OS. However I have to prepare a technical answer to this. That is, questions like - why a WAL file from 64 bit will not work in 32 bit. Also does the WAL file differ for same architecture but different kind of partitions?

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Reece Hart
On Wed, 2007-05-09 at 12:02 -0700, Dann Corbit wrote: Views can hide important information from the optimizer (especially index information). I believe that you're mistaken, and you can see it rather easily by explaining a select on a view (or even a view of views). For example:

Re: [GENERAL] In theory question

2007-05-09 Thread Alvaro Herrera
Joshua D. Drake wrote: Karsten Hilbert wrote: On Wed, May 09, 2007 at 10:29:02AM -0700, Joshua D. Drake wrote: This is exactly what I was asking about. So my theoretical idea has already been implemented. Now if only *all* my ideas were done for me by the time I came up with them :) Then

Re: [GENERAL] In theory question

2007-05-09 Thread Joshua D. Drake
Alvaro Herrera wrote: Joshua D. Drake wrote: Karsten Hilbert wrote: On Wed, May 09, 2007 at 10:29:02AM -0700, Joshua D. Drake wrote: This is exactly what I was asking about. So my theoretical idea has already been implemented. Now if only *all* my ideas were done for me by the time I came up

[GENERAL] Replication for PG 8 recommendations

2007-05-09 Thread David Wall
Is there a preferred replication system for PG 8 db users? Obviously, we're looking for robustness, ease of operations/installation, low latency and efficient with system and network resources, with an active open source community being preferred. Thanks, David

Re: [GENERAL] CentOS 5, pg8.4.2, could not read time zone file

2007-05-09 Thread Devrim GÜNDÜZ
Hi, On Wed, 2007-05-09 at 12:51 -0400, Wade Hampton wrote: The build of rhel src rpm failed due to This platform is not thread safe. Check the file 'config.lg' fo rthe exact reason. Is this CentOS 5 final? I saw this issue in a beta release of RHEL5, but I saw that it is fixed in final

Re: [GENERAL] In theory question

2007-05-09 Thread David Fetter
On Wed, May 09, 2007 at 10:29:02AM -0700, Joshua D. Drake wrote: Naz Gassiep wrote: Hannes Dorbath wrote: I think this is close to what MySQL's query cache does. The question is if this should be the job of the DBMS and not another layer. At least the pgmemcache author and I think that it's

Re: [GENERAL] Replication for PG 8 recommendations

2007-05-09 Thread Jeff Davis
On Wed, 2007-05-09 at 14:40 -0700, David Wall wrote: Is there a preferred replication system for PG 8 db users? Obviously, we're looking for robustness, ease of operations/installation, low latency and efficient with system and network resources, with an active open source community being

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Richard Broersma Jr
--- Reece Hart [EMAIL PROTECTED] wrote: I believe that you're mistaken, and you can see it rather easily by explaining a select on a view (or even a view of views). For example: View definition: SELECT pa.palias_id, pv.pseq_id, pa.origin_id, pa.alias, pa.descr,

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Brent Wood
Ashish Karalkar wrote: Thanks Brent for your replay, What about the Disadvantages, Performance issues? As far as I'm aware, performance is the only real disadvantage. I tend to break DB design into stages: ER modelling to define the entities/relationships the DB needs to store/represent

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Joshua D. Drake
Brent Wood wrote: Ashish Karalkar wrote: Thanks Brent for your replay, What about the Disadvantages, Performance issues? As far as I'm aware, performance is the only real disadvantage. What performance are we talking about here? Executing from a view although has *some* overhead, I don't

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/07 15:18, Dann Corbit wrote: [snip] That is a significant achievement, since many database systems do not have that ability. Maybe (probably!) back in the Oracle 6 days, but cost-based optimizers have done this for *years*. - -- Ron

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Michael Glaesemann
On May 9, 2007, at 19:58 , Joshua D. Drake wrote: Brent Wood wrote: Ashish Karalkar wrote: Thanks Brent for your replay, What about the Disadvantages, Performance issues? As far as I'm aware, performance is the only real disadvantage. What performance are we talking about here?

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Dann Corbit
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Ron Johnson Sent: Wednesday, May 09, 2007 6:07 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Views- Advantages and Disadvantages -BEGIN PGP SIGNED MESSAGE- Hash:

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/09/07 20:21, Dann Corbit wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Ron Johnson Sent: Wednesday, May 09, 2007 6:07 PM To: pgsql-general@postgresql.org Subject: Re:

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-09 Thread Brent Wood
Joshua D. Drake wrote: Brent Wood wrote: Ashish Karalkar wrote: Thanks Brent for your replay, What about the Disadvantages, Performance issues? As far as I'm aware, performance is the only real disadvantage. What performance are we talking about here? Executing from a view although has

[GENERAL] IP Address Validation

2007-05-09 Thread Jasbinder Singh Bali
Hi, I need to check whether the input string is in ip address format or not in one of my pl/pgsql functions. What function should be used to accomplish this I tried using if inet(strInput) However, it throws an exception if the input string is not in IP address format. I could have caught this

Re: [GENERAL] Replication for PG 8 recommendations

2007-05-09 Thread David Wall
On Wed, 2007-05-09 at 14:40 -0700, David Wall wrote: Is there a preferred replication system for PG 8 db users? Obviously, we're looking for robustness, ease of operations/installation, low latency and efficient with system and network resources, with an active open source community

Re: [GENERAL] IP Address Validation

2007-05-09 Thread Michael Fuhr
On Thu, May 10, 2007 at 12:22:37AM -0400, Jasbinder Singh Bali wrote: I need to check whether the input string is in ip address format or not in one of my pl/pgsql functions. What function should be used to accomplish this I tried using if inet(strInput) However, it throws an exception

Re: [GENERAL] In theory question

2007-05-09 Thread Naz Gassiep
I have always found MySQL's query cache to be utterly useless. Think about it this way : It only works for tables that seldom change. It does not work for big tables (like the posts table of a forum) because the cache would have to be huge. So, the most frequent usage