Re: [GENERAL] [PGSQL 8.3.5] How to handle FKs with partitioning?

2008-12-20 Thread Reg Me Please
My idea is that DRI will help during the the JOINs I'll need to make later. Creating a trigger to check the consistence would not help for that case, unless my idea is wrong. In which case I'd follow the great Merlin's hint. So the question is now: do DRI impact on JOINs efficiency? What'd be the

Re: [GENERAL] [PGSQL 8.3.5] How to handle FKs with partitioning?

2008-12-20 Thread Merlin Moncure
> On Friday December 19 2008 17:15:56 Merlin Moncure wrote: >> On Fri, Dec 19, 2008 at 6:04 AM, Reg Me Please >> > I need to implement something very similar to temporal table partitioning >> > as described in the documentation at chapter 5.9. >> > >> > My issues come from the fact that I have oth

[GENERAL] Custom Type Alignment

2008-12-20 Thread Paul Ramsey
Simple question on CREATE TYPE (I hope): When using the "alignment" option, and setting it to "double", what ends up double aligned? VARDATA()? The whole thing datum (so that the alignment of VARDATA() is actually conditioned on the size of VARHDRSZ) ? Thanks, Paul -- Sent via pgsql-general ma

Re: [GENERAL] Custom Type Alignment

2008-12-20 Thread Tom Lane
"Paul Ramsey" writes: > Simple question on CREATE TYPE (I hope): > When using the "alignment" option, and setting it to "double", what > ends up double aligned? VARDATA()? The whole thing datum (so that the > alignment of VARDATA() is actually conditioned on the size of > VARHDRSZ) ? No, the valu

[GENERAL] infinity interval

2008-12-20 Thread Gerhard Heift
Hello, how can I store an infinity value into an interval? I want to store offsets to a timestamp, and for some cases i need +infinity and -infinity as result. I want to make something like this: SELECT now() + 'infinity'::interval; This should return 'infinity'::timestamp. Is it possible? Tha

Re: [GENERAL] infinity interval

2008-12-20 Thread Richard Broersma
On Sat, Dec 20, 2008 at 3:52 PM, Gerhard Heift wrote: > how can I store an infinity value into an interval? I don't think you can: postgres=# select INTERVAL '1 week' + 'infinity'::timestamp; ?column? -- infinity (1 row) postgres=# select INTERVAL 'infinity' + now(); ERROR: invalid

Re: [GENERAL] infinity interval

2008-12-20 Thread Martin Gainty
Gerhard- did you try to use a PL/SQL Block to initialize the necessary integer values in your declare block e.g. DECLARE SET @INT_MIN = INTEGER ( min ); --Min Value SET @INT_MAX = INTEGER ( max ); --Max value BEGIN END; http://pgscript.projects.postgresql.org/SCRIPT.html HTH Martin __

Re: [GENERAL] infinity interval

2008-12-20 Thread Bruce Momjian
Gerhard Heift wrote: > how can I store an infinity value into an interval? I want to store > offsets to a timestamp, and for some cases i need +infinity and > -infinity as result. > > I want to make something like this: > SELECT now() + 'infinity'::interval; > > This should return 'infinity'::tim