[GENERAL] Using case expressions in update set clause

2007-10-14 Thread Chris Velevitch
d for the current record is null then set the date_field with some_date value otherwise keep the current value of date_field. Note: in the actual situation there'll be other fields that will always be updated in addition to this one field that needs to be conditionally updated. Chris

[GENERAL] Create index syntax error

2007-11-28 Thread Chris Velevitch
pprover1_idx on jobs (approver1_id) ^ ** Error ** ERROR: syntax error at or near "index" SQL state: 42601 Character: 16 Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group m: 0415 469 095 www.flashdev.org.au --

[GENERAL] Why upgrade?

2007-11-28 Thread Chris Velevitch
I'm currently using 7.4 and I trying find out what the value/advantage of upgrading to a more recent version and to which version. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group m: 0415 469 095 www.flashdev.org.au ---(end of broa

[GENERAL] 7.4 end of life

2007-12-05 Thread Chris Velevitch
Where can I find information on when support for 7.4.x formally cease? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group m: 0415 469 095 www.flashdev.org.au ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] Understanding how partial indexes work?

2007-12-05 Thread Chris Velevitch
I have a query on a table:- X between k1 and k2 or X < k1 and Y <> k3 where k1, k2, k3 are constants. How would this query work, if I created an index on X and a partial index on X where Y <> k3? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group

Re: [GENERAL] Understanding how partial indexes work?

2007-12-06 Thread Chris Velevitch
On Dec 7, 2007 2:39 AM, Scott Marlowe <[EMAIL PROTECTED]> wrote: > On Dec 6, 2007 1:44 AM, Chris Velevitch <[EMAIL PROTECTED]> wrote: > > I have a query on a table:- > > > > X between k1 and k2 or X < k1 and Y <> k3 > > > > where k1, k2, k

Re: [GENERAL] Understanding how partial indexes work?

2007-12-06 Thread Chris Velevitch
On Dec 7, 2007 2:39 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Chris Velevitch" <[EMAIL PROTECTED]> writes: > > I have a query on a table:- > > X between k1 and k2 or X < k1 and Y <> k3 > > > where k1, k2, k3 are constants. > >

[GENERAL] Terminology definitions/meaning

2007-12-11 Thread Chris Velevitch
I'm trying to understand the explain output, but I can't find any references to the meanings of the following terms:- merge join nested loop merge left join nested loop left join I'm using 7.4. Chris -- Chris Velevitch Manager - Sydney Flash Platform Dev

[GENERAL] pg_dump ignoring without oids

2008-04-03 Thread Chris Velevitch
out oids? -- Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group m: 0415 469 095 www.flashdev.org.au Sydney Flash Platform Developers Group March AIR and SQLite Date: Wed 26th March 6pm for 6:30 start Details soon -- Sent via pgsql-general mailing list (pgsql-general@pos

Re: [GENERAL] pg_dump ignoring without oids

2008-04-03 Thread Chris Velevitch
that be installed without removing my 8.1 utils. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group m: 0415 469 095 www.flashdev.org.au Sydney Flash Platform Developers Group April meeting: TBD Date: Mon 28th April 6pm for 6:30 start Details soon -- Sent via pgsql-

Re: [GENERAL] pg_dump ignoring without oids

2008-04-03 Thread Chris Velevitch
On Fri, Apr 4, 2008 at 2:50 PM, Chris Velevitch <[EMAIL PROTECTED]> wrote: > In the mean time, which download has only the 7.4 utils and can that > be installed without removing my 8.1 utils. I'm using Centos 5. Chris -- Chris Velevitch Manager - Sydney Flash Platform D

Re: [GENERAL] pg_dump ignoring without oids

2008-04-03 Thread Chris Velevitch
On Fri, Apr 4, 2008 at 4:33 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Chris Velevitch" <[EMAIL PROTECTED]> writes: > > On Fri, Apr 4, 2008 at 2:50 PM, Chris Velevitch > > <[EMAIL PROTECTED]> wrote: > >> In the mean time, which download ha

[GENERAL] how to get pg_restore to continue if an error occurs

2008-04-14 Thread Chris Velevitch
he restore is complete as a cursory look seems to indicate the restore is complete? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group m: 0415 469 095 www.flashdev.org.au Sydney Flash Platform Developers Group April meeting: TBD Date: Mon 28th April 6pm for 6:30 start Detai

Re: [GENERAL] how to get pg_restore to continue if an error occurs

2008-04-14 Thread Chris Velevitch
res So by saving this output and commenting out (using the ';') the entries you what ignored, you can then run the pg_restore util with the --use-list=list-file and only the uncommented items will be restored. Pretty neat. Chris -- Chris Velevitch Manager - Sydney Flash Platform Develope

[GENERAL] End of updates info

2009-07-07 Thread Chris Velevitch
Where do I find information on which versions are no longer being updated or will soon cease being updated? Chris -- Chris Velevitch Manager - Adobe Platform Users Group, Sydney m: 0415 469 095 www.apugs.org.au Adobe Platform Users Group, Sydney July meeting: Going It Alone Date: Mon 20th July

[GENERAL] Is the wiki down?

2010-04-27 Thread Chris Velevitch
I was just checking http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policy and I get a connection time out. Is the site down? Chris -- Chris Velevitch Manager - Adobe Platform Users Group, Sydney m: 0415 469 095 www.apugs.org.au Adobe Platform Users Group, Sydney May 2010: TBD Date

Re: [GENERAL] Is the wiki down?

2010-04-28 Thread Chris Velevitch
On Wed, Apr 28, 2010 at 14:36, Greg Smith wrote: > Chris Velevitch wrote: >> I was just checking >> http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policy and >> I get a connection time out. >> Is the site down? > > I'm not sure if it's down

Re: [GENERAL] Group By Question

2010-10-05 Thread Chris Velevitch
nique, the order by clause makes the first row of every group the most recent like and distinct expression keeps only the first row for each person. Chris -- Chris Velevitch Manager - Adobe Platform Users Group, Sydney m: 0415 469 095 www.apugs.org.au Adobe Platform Users Group, Sydney October

[GENERAL] declare column update expression

2008-09-11 Thread Chris Velevitch
In 7.4, how do I declare that a column in a table is to be automatically set to the value of some fixed expression whenever a row is updated? Eg column last_modified is always set to current_timestamp Chris -- Chris Velevitch Manager - Adobe Platform Users Group, Sydney m: 0415 469 095

Re: [GENERAL] declare column update expression

2008-09-11 Thread Chris Velevitch
pdate? Chris -- Chris Velevitch Manager - Adobe Platform Users Group, Sydney m: 0415 469 095 www.apugs.org.au Adobe Platform Users Group, Sydney September meeting: It's Going To Be Brilliant Date: Mon 29th September 6pm for 6:30 start Details and RSVP on http://apugs2008september.eventbrite.com

Re: [GENERAL] declare column update expression

2008-09-11 Thread Chris Velevitch
ields value. If I forget to modify one statement, things will break. That's why I'm looking for a declarative way of doing and let database handle it like it handles setting the default value of a column on insert. Chris -- Chris Velevitch Manager - Adobe Platform Users Group, Sydne

Re: [GENERAL] declare column update expression

2008-09-11 Thread Chris Velevitch
#x27;'now''; >RETURN new; >END; > ' LANGUAGE 'plpgsql'; This does work in 7.4. It doesn't like 'opaque', whatever that is. It doesn't like language plpgsql. I'm using a shared hosted database, so I'm probably not allowe

[GENERAL] Statement level trigger clarification

2008-09-14 Thread Chris Velevitch
FOR EACH STATEMENT EXECUTE PROCEDURE my_function(); and my update statement were to update more than one row, would I be correct in understanding that every row the update statement touches will have the exact same value for last_modified? Chris -- Chris Velevitch Manager - Adobe Platform U

[GENERAL] querying the value of the previous row

2010-03-11 Thread Chris Velevitch
pg 7.4) Chris -- Chris Velevitch Manager - Adobe Platform Users Group, Sydney m: 0415 469 095 www.apugs.org.au Adobe Platform Users Group, Sydney March 2010: ColdFusion Application Architecture for the Impatient and Using jQuery when Flash is Overkill Date: 29nd Mar 6pm for 6:30 start Details

[GENERAL] How efficient is select currval?

2005-12-08 Thread Chris Velevitch
If I insert a record into a table with a serial primary key, does select currval fetch it from the database or does it get it from within memory? If it fetches it from the database, should I use a Serializable transaction or just a read committed transaction? Chris -- Chris Velevitch Manager

[GENERAL] update count

2005-12-18 Thread Chris Velevitch
(for v7.4.5) How do I get the number of rows updated by an update command? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] Which table(s) in the catalog define the tables and views?

2006-01-25 Thread Chris Velevitch
I'm want to write a query to list definitions of all the fields in my tables and which table it belongs to. And similarly for views and tables. This is so I can check for table and column name consistency, extra tables and column type consistency. Chris -- Chris Velevitch Manager - Sydney

[GENERAL] Which indexes does a query use?

2006-02-26 Thread Chris Velevitch
one < now())) If I'm reading this right, it's telling me that is NOT using any indexes. Clearly, this is wrong. I would have expected that index on activity_user_id would have been used to help find all the records efficiently. Chris -- Chris Velevitch Manager - Sydney Flash Pla

Fwd: [GENERAL] Which indexes does a query use?

2006-02-26 Thread Chris Velevitch
with time zone < now())) Total runtime: 3.000 ms (6 rows) Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] pg_dump and copy command

2006-04-05 Thread Chris Velevitch
ding code? Are there any special options that I must use with pg_dump to make this code executeable? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 3: Have you checked ou

[GENERAL] Problem with complex outer join expression

2006-04-25 Thread Chris Velevitch
g dates and any corresponding timesheets for those weekending dates. What am I doing wrong here? How do I achieve what I want? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] Mailing list setup issue

2006-04-26 Thread Chris Velevitch
It seems that all the postgresql mailing lists don't allow you to automatically reply to the list only the sender. I don't get this with all my other mailings list. Who I contact to have this rectified? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flash

Re: [GENERAL] Problem with complex outer join expression

2006-04-26 Thread Chris Velevitch
dummy_records tables look like? timesheets.weekending is a date dummy_records.sequence_nr is int8 Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Problem with complex outer join expression

2006-04-26 Thread Chris Velevitch
et 'ERROR: operator does not exist: integer + date'. What do I need to do to add a number to a date? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 5: don't for

Re: [GENERAL] Mailing list setup issue

2006-04-27 Thread Chris Velevitch
27;t anyone can just go and change the postgresql.org mailing list software configuration? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Mailing list setup issue

2006-04-27 Thread Chris Velevitch
e the only ones that I've seem do that. So what's the reasoning behind this choice? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 9: In versions below 8.0, the planne

Re: [GENERAL] Mailing list setup issue

2006-04-27 Thread Chris Velevitch
e, but I use 3 mailer readers (gmail, outlook, opera) and none of them have a the same features as elm. I think it's an inappropriate choice given the current norms. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(e

Re: [GENERAL] Mailing list setup issue

2006-04-27 Thread Chris Velevitch
On 4/27/06, Martijn van Oosterhout wrote: > Fortunatly we have a mailing list manager that allows you to choose > which way you want it. Please explain what you mean by this? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.

Re: [GENERAL] Mailing list setup issue

2006-04-27 Thread Chris Velevitch
I beleive) replyto. > > Have a nice day, Thanks for that information. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Problem with complex outer join expression

2006-04-27 Thread Chris Velevitch
built in. I'm using a shared host for pg, so I'm limited to they are prepared to support. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Problem with complex outer join expression

2006-04-27 Thread Chris Velevitch
ifferent operators. I'll double check the order I've been using, but I'm using shared hosting for pg, so I'm limited to what they're prepared to support. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au -

[GENERAL] How to join to delete

2006-05-01 Thread Chris Velevitch
I'm using pg 7.4.5 on Win XP SP1. I want to delete rows from a table B, but need to join it to another table A in order to select the rows in B to be deleted. Eg. Delete from A join B on (A.bk = B.bk) where A.ak = x; but only delete rows from B. How do I acheive this? Chris --

Re: [GENERAL] How to join to delete

2006-05-02 Thread Chris Velevitch
On 5/2/06, Richard Huxton wrote: Chris Velevitch wrote: > I'm using pg 7.4.5 on Win XP SP1. The first official release for Windows was 8.0, and there have been I'm the cygwin version of pg for testing. several bugfixes to 7.4.x since then. Upgrade as soon as is practical.

[GENERAL] How to estimate disk space

2006-05-24 Thread Chris Velevitch
Is there a reference on how to estimate the disk space requirements of a database? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] How to estimate disk space

2006-05-24 Thread Chris Velevitch
index page but light on the details. But the simplest way is to populate with a fraction of your real data requirements and scale that up. I don't think works well. How do I work out the space taken by a single table that grows at a different rate than another table? Chris -- Chris Ve

[GENERAL] create view problem

2006-06-02 Thread Chris Velevitch
I'm using pg 7.4.5 (cygwin) on win xp sp1. When I enter:- create view v1 as select * from t1; I get:- ERROR: syntax error at or near "view" at character 16 Why? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.

Re: [GENERAL] create view problem

2006-06-02 Thread Chris Velevitch
On 6/2/06, Tom Lane wrote: "Chris Velevitch" writes: > I'm using pg 7.4.5 (cygwin) on win xp sp1. > When I enter:- > create view v1 as select * from t1; > I get:- > ERROR: syntax error at or near "view" at character 16 Repeatably? "view&q

Re: [GENERAL] create view problem

2006-06-04 Thread Chris Velevitch
On 6/3/06, Chris Velevitch wrote: On 6/2/06, Tom Lane wrote: > "Chris Velevitch" writes: > > I'm using pg 7.4.5 (cygwin) on win xp sp1. > > When I enter:- > > create view v1 as select * from t1; > > I get:- > > ERROR: syntax error

[GENERAL] What is the point of create or replace view command

2006-06-04 Thread Chris Velevitch
What is the point of the create or replace view command if you can't change the column and data types ? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 1: if po

Re: [GENERAL] What is the point of create or replace view command

2006-06-04 Thread Chris Velevitch
On 6/5/06, Berend Tober wrote: Chris Velevitch wrote: > What is the point of the create or replace view command if you can't > change the column and data types ? You could have a calculated column and change the calcuation. You could change the sort order, selection, or group

Re: [GENERAL] What is the point of create or replace view command

2006-06-04 Thread Chris Velevitch
On 6/5/06, Tom Lane wrote: "Chris Velevitch" <[EMAIL PROTECTED]> writes: > What is the point of the create or replace view command if you can't > change the column and data types ? You might as well ask what's the point of CREATE OR REPLACE FUNCTION, wh

Re: [GENERAL] What is the point of create or replace view command

2006-06-04 Thread Chris Velevitch
On 6/5/06, brian ally wrote: Chris Velevitch wrote: > Yes, please, what is point of CREATE OR REPLACE FUNCTION, when it > doesn't let you change the function's parameter list or result type? The way that user-created functions work allows one to have the same function nam

Re: [GENERAL] What is the point of create or replace view command

2006-06-04 Thread Chris Velevitch
On 6/5/06, Joe Conway wrote: Chris Velevitch wrote: > But what about my original question? > > "What is the point of the create or replace view command if you > can't change the > column and data types?" -- create table t1 create table t1(f int); -- cr

Re: [GENERAL] create view problem

2006-06-05 Thread Chris Velevitch
On 6/5/06, Thomas Hallgren wrote: Chris Velevitch wrote: > Why doesn't explain work with create views? There's nothing in the > documentation saying it shouldn't. > No? The documentation for explain clearly states that the statement that follow the EXPLAIN keywor