Re: [GENERAL] Update with ORDER BY and LIMIT

2011-08-09 Thread Paul M Foster
k to aptitude to find out it's verson 8.3.1-1 running under Debian unstable. Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com -- 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] Update with ORDER BY and LIMIT

2011-08-08 Thread Paul M Foster
= table2.field; > > SO: > > UPDATE customer > SET lpmtdt = rcpt.rcptdt, lpmtamt = rcpt.rcptamt > FROM (SELECT custno, rcptdt, rcptamt FROM cashh WHERE ... ORDER BY ... LIMIT > 1) rcpt > WHERE customer.custno = rcpt.custno AND customer.lptmdt IS NULL OR > customer.lpmtamt IS NU

[GENERAL] Update with ORDER BY and LIMIT

2011-08-08 Thread Paul M Foster
ash receipt for this customer.) But I can't seem to merge this with an "UPDATE cust ..." query so the update happens in one step. Any help? Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) T

[GENERAL] Updates: all or partial records

2010-01-24 Thread Paul M Foster
included or omitted on UPDATE statements? Paul -- Paul M. Foster -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: Re[GENERAL] sources for learning PostgreSQL

2009-09-22 Thread Paul M Foster
ay not even need the books, if you peruse the website. Paul -- Paul M. Foster -- 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] What kind of JOIN, if any?

2009-09-17 Thread Paul M Foster
On Thu, Sep 17, 2009 at 11:23:12AM -0400, Mark Styles wrote: > On Thu, Sep 17, 2009 at 10:29:11AM -0400, Paul M Foster wrote: > > I can't find a way to do this purely with SQL. Any help would be > > appreciated. > > > > Table 1: urls > > > > id

Re: [GENERAL] What kind of JOIN, if any?

2009-09-17 Thread Paul M Foster
On Thu, Sep 17, 2009 at 04:20:57PM +0100, Sam Mason wrote: > On Thu, Sep 17, 2009 at 10:29:11AM -0400, Paul M Foster wrote: > > I want all the records of the > > url table, one row for each record, plus the userid field that goes with > > it, for a specified user (paulf),

[GENERAL] What kind of JOIN, if any?

2009-09-17 Thread Paul M Foster
f | bravo | charlie | delta I can do *part* of this with various JOINs, but the moment I specify userid = 'paulf', I don't get the rows with NULLs. Again, any help would be appreciated. Paul -- Paul M. Foster -- Sent via pgsql-general mailing list (pgsql-genera

[GENERAL] Ajax/PostgreSQL

2006-08-05 Thread Paul M Foster
ok of a page, but I can't work out how it would allow interactive use of a PostgreSQL table. -- Paul M. Foster ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joi

Re: [GENERAL] Any *real* reason to choose a natural, composite PK

2006-06-08 Thread Paul M Foster
very different out there. Give me a mechanical engineer any day over an architect who's never been near a building. (I don't know much about Frank Lloyd Wright's education, but he built some beautiful buildings which didn't stand up well to the elements.) -- Paul M. Foster --

Re: [GENERAL] Re: PostgreSQL vs Oracle vs DB2 vs MySQL - Which should I use?

2001-02-17 Thread Paul M Foster
On Fri, Feb 16, 2001 at 09:36:23AM -0500, Bruce Momjian wrote: > > Funny you should mention PHP. I talked to Rasmus about the email volume > when I first met him in the fall. He said the volume of email is so > great that just reading the subject lines takes a long time. > > We aren't there

Re: [GENERAL] Importing a Database

2001-02-12 Thread Paul M Foster
On Sat, Feb 10, 2001 at 11:16:45AM -0500, wrote: > If i have a dbf database, how can I import it into PostgreSQL? > > Thanks > I have a program that does this. I've set up a project at SourceForge for it, but I'm still fighting with them over CVS access etc. If you're interested, I can email

Re: [GENERAL] PostgreSQL vs Oracle vs DB2 vs MySQL - Which should I use?

2001-02-12 Thread Paul M Foster
On Tue, Feb 13, 2001 at 11:55:18AM +1300, Christopher Sawtell wrote: > It is supported by a very competent team of developers who are not only > determined to stay at the front of open source database race, but also > quite patently give the impression that they actually _care_ about their >

Re: [GENERAL] Data entry screen building utilities

2001-01-22 Thread Paul M Foster
On Mon, Jan 22, 2001 at 03:14:36PM -0800, Tim Barnard wrote: > Rather than writing PostgreSQL data entry screens from scratch using > ncurses and cdk, is anyone aware of any data entry screen building > utilities useful for character-based screens, as opposed to GUI > utilities? I had never hear

[GENERAL] Script Location

2000-11-15 Thread Paul M Foster
When I dump a database (creating a script from the pg_dump command), I can't just put it in any old directory and point psql at it. I have to put it in the /var/lib/pgsql subdirs before postgresql will accept it. Is this right? Am I doing something wrong? Is this a bug^H^H^Hfeature? P