[GENERAL] Date column that defaults to 'now'

2004-01-05 Thread John Siracusa
How can I create a non-null date column that defaults to 'now' as computed at the time the row is inserted? -John ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL

Re: [GENERAL] Date column that defaults to 'now'

2004-01-05 Thread John Siracusa
On 1/5/04 4:29 PM, Michael Glaesemann wrote: > (If you're not the John Siracusa who writes for Ars Technica, the > sentiment still holds. :) ) I am everywhere! (worked, thanks to both of you who replied :) -John ---(end of broadcast)--

[GENERAL] Indexes and sorting

2004-02-06 Thread John Siracusa
Are indexes useful for speeding up ORDER BY clauses? Example: CREATE TABLE t ( a INT, b INT, c INT, d INT ); SELECT * FROM t WHERE a = 1 AND b = 2 AND c = 3 ORDER BY b; Let's say the table just has one index: CREATE INDEX b_idx ON t (b); In this cas

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-10 Thread John Siracusa
On 2/10/04 12:28 PM, Tom Lane wrote: > Joe Lester <[EMAIL PROTECTED]> writes: >> Would this be kern.maxfiles? > > Sounds like what you want. There's probably no need to reduce > maxfilesperproc (and thereby constrain every process not only PG > backends). You can set PG's max_files_per_process i

Re: [GENERAL] Shared memory errors during initdb in Mac OS X

2004-03-22 Thread John Siracusa
On 3/22/04 1:45 PM, John Siracusa wrote: > Of course, I'v already set all the shared memory params, and have been runing > 7.4.1 quite successfully with them. Immediately after the error above, I ran > this to check the values: > > % sysctl -a | egrep shm > ker

[GENERAL] Scary behavior after power failure

2004-05-14 Thread John Siracusa
We had a power failure (and a UPS failure) on our database machine. It's back up now but some spooky stuff is happening. Here's an example: (Names changed to protect the guilty.) First, the table: --- CREATE TABLE foo ( id SERIAL PRIMARY KEY, barINT NOT NULL REFERENCES b