Re: [SQL] Aggregate Functions Template

2005-06-13 Thread postgres

Hi, Sqlers -

I just installed 8.0.3, and am getting up to speed with the new
features.  First on my list is Tablespaces. In the docs, I see this:


Note:  There is usually not much point in making more than one
tablespace per logical file system, since you cannot control the
location of individual files within a logical file system. However,
PostgreSQL does not enforce any such limitation, and indeed it is
not directly aware of the file system boundaries on your system. It
just stores files in the directories you tell it to use. 

(http://www.postgresql.org/docs/8.0/interactive/manage-ag-tablespaces.html)

I assume this is from the perspective of performance, correct? I was
planning on doing a tablespace per logical project, as we internally
structure most other things that way, and also to ease moving things
around in the event we restructure filesystems, move things between
servers, etc.

In general, at least on our development machines, I was planning on
using them to make data management easier.  I note that I'm not seeing
any Oracle style alter tablespace ... commands for moving things around,
but it appears from that page that it is possible to do by changing the
$PGDATA/pg_tblspc/$symlink and updating pg_tablespace (even if doing so
is 'not recommended'). 

Is this a flawed use of tablespaces?

Thanks,

-j


-- 
Jamie Lawrence[EMAIL PROTECTED]
"Reality must take precedence over public relations, for nature cannot be
fooled."
   - Richard P. Feynman



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [SQL] getting details about integrity constraint violation

2005-06-13 Thread Greg Sabino Mullane

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Markus Bertheau asked:
> how would I find out details about for example what constraint was
> violated by an insert statement? The SQL state tells me, that a unique
> constraint was violated, but it doesn't say which one.

Simply name the table constraints yourself with a descriptive name, so you
always know exactly what is going on:

greg=# create table unitest(a int, b text);
CREATE TABLE
greg=# alter table unitest add constraint "unitest_column_a_is_not_unique" 
unique(a);
NOTICE:  ALTER TABLE / ADD UNIQUE will create implicit index 
"unitest_column_a_is_not_unique" for table "unitest"
greg=# insert into unitest (a) values (1);
INSERT 0 1
greg=# insert into unitest (a) values (1);
ERROR:  duplicate key violates unique constraint 
"unitest_column_a_is_not_unique"

- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200506121520
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-

iD8DBQFCrIsevJuQZxSWSsgRAh+gAJ94AsB7rZzpxT7pogC1tgbPaQJzJQCg5YkC
E9dXkQk4qP8r8zjCEucxpt0=
=NDgJ
-END PGP SIGNATURE-



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[SQL] Spam Re: read it immediately

2005-06-13 Thread alessio
Requested file.

Potentially Dangerous Attachment Removed. The file "text.txt.exe" has been 
blocked.  File quarantined as: "".
A

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [SQL] getting details about integrity constraint violation

2005-06-13 Thread Markus Bertheau
Dnia 14-06-2005, wto o godzinie 03:39 +, Greg Sabino Mullane
napisaƂ(a):

> Simply name the table constraints yourself with a descriptive name, so you
> always know exactly what is going on:

And then I keep a list of all the constraint names and scan the error
message for it?

Markus
-- 
Markus Bertheau <[EMAIL PROTECTED]>


signature.asc
Description: This is a digitally signed message part