Re: [GENERAL] Delete all records NOT referenced by Foreign Keys

2003-12-13 Thread Martijn van Oosterhout
On Sat, Dec 13, 2003 at 09:48:16PM -0600, D. Dante Lorenso wrote: > This is something very ugly indeed and is what I'll have to resort to unless > I can find something cleaner. Ideally, I would be able to run this cleanup > on a subset of the table data after an insert into the table. I would lik

Re: [GENERAL] tablespaces in 7.5?

2003-12-13 Thread Keith C. Perry
Quoting Greg Stark <[EMAIL PROTECTED]>: > "Keith C. Perry" <[EMAIL PROTECTED]> writes: > > > Ok, thats for the response. I take it a PG namespace = Oracle table space > (or > > namespace is simply the generic term). > > Actually if you check back you'll notice you're the first person to say >

Re: [GENERAL] make error Mac OS X (ar: illegal option -- s)

2003-12-13 Thread Michael Glaesemann
On Sunday, December 14, 2003, at 07:08 AM, Andrew Rawnsley wrote: On 10.3, yes. Works fine. No problems building. I think I had the release candidates running on 10.2, but I can't remember exactly when I upgraded postgres and OS X. On Dec 13, 2003, at 12:28 PM, Joel Rodrigues wrote: Has anyone s

[GENERAL]

2003-12-13 Thread WeiJianJun
unsubscribe [EMAIL PROTECTED] ---(end of broadcast)--- TIP 8: explain analyze is your friend

[GENERAL]

2003-12-13 Thread WeiJianJun
unsubscribe [EMAIL PROTECTED] ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Delete all records NOT referenced by Foreign Keys

2003-12-13 Thread D. Dante Lorenso
Bruno Wolff III wrote: On Sat, Dec 13, 2003 at 02:20:15 -0600, "D. Dante Lorenso" <[EMAIL PROTECTED]> wrote: I'd like to run a clean up command on my tables to eliminate rows that I'm no longer using in the database. I want to do something like this: DELETE FROM tablename WHERE IS_REFEREN

Re: [GENERAL] tablespaces in 7.5?

2003-12-13 Thread Greg Stark
"Keith C. Perry" <[EMAIL PROTECTED]> writes: > Ok, thats for the response. I take it a PG namespace = Oracle table space (or > namespace is simply the generic term). Actually if you check back you'll notice you're the first person to say "namespace". The original question was about "tablespace

Re: [GENERAL] Reordering results for a report

2003-12-13 Thread Greg Stark
Nathaniel Price <[EMAIL PROTECTED]> writes: > I'm new to this list, so I'm not sure if this is the right place to post this. > If not, please direct me to where it would be better to post it. > > Anyway, I'm creating a report generation tool of sorts in PHP for a database. > As part of this repor

Re: [GENERAL] Delete all records NOT referenced by Foreign Keys

2003-12-13 Thread Bruno Wolff III
On Sat, Dec 13, 2003 at 02:20:15 -0600, "D. Dante Lorenso" <[EMAIL PROTECTED]> wrote: > I'd like to run a clean up command on my tables to > eliminate rows that I'm no longer using in the database. > > I want to do something like this: > >DELETE FROM tablename >WHERE IS_REFERENCED_BY_FO

Re: [GENERAL] Reordering results for a report

2003-12-13 Thread Bruno Wolff III
On Fri, Dec 12, 2003 at 14:40:34 -0800, Nathaniel Price <[EMAIL PROTECTED]> wrote: > Sorry, that's not really what I'm looking for. When I said that the sort > order could be arbitrary, I meant /arbitrary/. As in "no amount of ORDER > BYs will save me from this one" arbitrary; the records could

Re: [GENERAL] make error Mac OS X (ar: illegal option -- s)

2003-12-13 Thread Andrew Rawnsley
On 10.3, yes. Works fine. No problems building. I think I had the release candidates running on 10.2, but I can't remember exactly when I upgraded postgres and OS X. On Dec 13, 2003, at 12:28 PM, Joel Rodrigues wrote: Hi, In light of no responses to the make error question - Has anyone succeed

Re: [GENERAL] Calculating total amounts per clientid

2003-12-13 Thread MT
Thanks for responding. That was the tip I needed. Regards, Mark On Sat, 13 Dec 2003 16:36:32 -0300 Martin Marques <[EMAIL PROTECTED]> wrote: > El Sáb 13 Dic 2003 16:21, MT escribió: > > Hi, > > > > I have an invoicing system using postgresql. Each time a customer makes a > purchase, a new rec

Re: [GENERAL] tablespaces in 7.5?

2003-12-13 Thread Keith C. Perry
Quoting Mike Nolan <[EMAIL PROTECTED]>: > > Ok, thats for the response. I take it a PG namespace = Oracle table space > (or > > namespace is simply the generic term). I can see some definite benefits > > especially with disk i/o throughput though I thought database partitioning > (I > > think th

Re: [GENERAL] Calculating total amounts per clientid

2003-12-13 Thread Martin Marques
El Sáb 13 Dic 2003 16:21, MT escribió: > Hi, > > I have an invoicing system using postgresql. Each time a customer makes a purchase, a new record is inserted into the "cart" table. The "cart" table, among other things, contains a customer_id field and a total for the amount purchased on the par

[GENERAL] Calculating total amounts per clientid

2003-12-13 Thread MT
Hi, I have an invoicing system using postgresql. Each time a customer makes a purchase, a new record is inserted into the "cart" table. The "cart" table, among other things, contains a customer_id field and a total for the amount purchased on the particular invoice. Now what I'd like to do is t

Re: [GENERAL] Why is postgres an ORDMS

2003-12-13 Thread Josué Maldonado
Hi Peter, In fact the inheritance was mi first tought, so as I didn't explain myself enough and I don't have too much knoledge in that topic, I sent him an URL of the practical postgresql book where that concept is explained. Peter Eisentraut wrote: Bruce Momjian wrote: Josué Maldonado wrote:

Re: [GENERAL] Why is postgres an ORDMS

2003-12-13 Thread Peter Eisentraut
Bruce Momjian wrote: > Josué Maldonado wrote: > > Hello list, > > > > A friend of mine just asked me this, why is postgres an ORDBMS and > > what does it mean and how to apply it on real development. > > We are OR (object-relational) because we are extendable, unlike a > typical DBMS. No, it means

Re: [GENERAL] tablespaces in 7.5?

2003-12-13 Thread Mike Nolan
> Ok, thats for the response. I take it a PG namespace = Oracle table space (or > namespace is simply the generic term). I can see some definite benefits > especially with disk i/o throughput though I thought database partitioning (I > think that is what its called) would provide the same thing.

Re: [GENERAL] Perl "with-perl" configuration option

2003-12-13 Thread Keith C. Perry
Quoting dj trombley <[EMAIL PROTECTED]>: > >No, the --with-perl option builds PL/Perl, which is server-side. I > recommend using the module DBD::Pg for connecting to the server from a > perl script and executing queries, but there are probably other modules > as well. > > > I read that t

Re: [GENERAL] tablespaces in 7.5?

2003-12-13 Thread Keith C. Perry
Quoting Brian Maguire <[EMAIL PROTECTED]>: > That's right it's a big one from a performance and admin perspective. DB2, > Oracle and Informix have tablespaces. It appears that it has been in the > postgres crosshair for a few years now. I'm not sure how much has been > completed so far. > >

Re: [GENERAL] make error Mac OS X (ar: illegal option -- s)

2003-12-13 Thread Joel Rodrigues
Hi, In light of no responses to the make error question - Has anyone succeeded in installing PostgreSQL 7.4 on Mac OS X (10.1/10.2/10.3) ? Until now PostgreSQL was always just a ./configure, make, make install away. - Joel On Friday, December 12, 2003, at 10:02 , Joel Rodrigues wrote: Thank

Re: [GENERAL] Read-only column

2003-12-13 Thread Claudio Succa
Il sab, 2003-12-13 alle 15:48, Chris Travers ha scritto: > Or, depending if you just want to ignore updates to that field (not > always best, but possible, similar to a view). > > CREATE OR REPLACE FUNCTION block_col() > RETURNS TRIGGER AS ' > BEGIN > NEW.ts_field := OLD.ts_fie

Re: [GENERAL] Why is postgres an ORDMS

2003-12-13 Thread Bruce Momjian
Josué Maldonado wrote: > Hello list, > > A friend of mine just asked me this, why is postgres an ORDBMS and what > does it mean and how to apply it on real development. We are OR (object-relational) because we are extendable, unlike a typical DBMS. -- Bruce Momjian|

Re: [GENERAL] Foreign keys and pg_user table

2003-12-13 Thread dj trombley
Well, it's not a table! It's a view: dbs=# \d pg_user View "pg_catalog.pg_user" Column| Type | Modifiers -+-+--- usename | name| usesysid| integer | usecreatedb | boolean | usesuper| boolean | usecatupd | boolean | passwd | text

Re: [GENERAL] Perl "with-perl" configuration option

2003-12-13 Thread dj trombley
No, the --with-perl option builds PL/Perl, which is server-side. I recommend using the module DBD::Pg for connecting to the server from a perl script and executing queries, but there are probably other modules as well. I read that the "--with-perl" option "Build the PL/Perl server-side lang

[GENERAL] Why is postgres an ORDMS

2003-12-13 Thread Josué Maldonado
Hello list, A friend of mine just asked me this, why is postgres an ORDBMS and what does it mean and how to apply it on real development. Any comments about it Thanks -- Josué Maldonado ---(end of broadcast)--- TIP 6: Have you searched our list

Re: [GENERAL] Read-only column

2003-12-13 Thread Chris Travers
Or, depending if you just want to ignore updates to that field (not always best, but possible, similar to a view). CREATE OR REPLACE FUNCTION block_col() RETURNS TRIGGER AS ' BEGIN NEW.ts_field := OLD.ts_field; RETURN NEW; END; ' LANGUAGE PLPGSQL; I

Re: [GENERAL] [NOVICE] PostgreSQL Training

2003-12-13 Thread Chris Travers
Hi Brett; On Sat, 2003-12-13 at 01:06, Bret Busby wrote: > > I assume from the above, that the 1 one (Basic competency), would be > the equivalent of the MySQL 4 Core Certification? > > Would it not also be appropriate, to include in that one, installation > and (basic) configuration; that is,

Re: [GENERAL] Read-only column

2003-12-13 Thread Doug McNaught
Claudio Succa <[EMAIL PROTECTED]> writes: > (Not to reinvent the wheel, do you know where I could find a suitable > function to use in the trigger?) No, but it should be pretty trivial to write. Just set up a BEFORE UPDATE trigger that compares OLD.ts_field against NEW.ts_field and does a RAISE