[SQL] Different encodings in different DBs in same cluster

2005-07-24 Thread Jamie Lawrence
disabling any real locale awareness. Does anyone know what "more theoretical than real" mean in this context? If I set the locale to C, is it going to work correctly with UTF8 encoded data? Thanks, -j -- Jamie Lawrence[EMAIL PROTECTED] It&#x

Re: [SQL] relationship/table design question

2003-12-04 Thread Jamie Lawrence
the event and the contact. Some people call this a join table, others a mapping table, others [insert 15 other names for many to many relations]. You'll have to decide how updates and deletes should behave for your purposes, and add in those clauses to the foreign key declarations. HTH,

Re: [SQL] Updating session id based on accesstimeout

2003-11-29 Thread Jamie Lawrence
ou won't find a method faster than updating text files, until you stop brute forcing the data. Databases don't provide speed, at least in this case. They provide ACID compliance, and other features. Perhaps, if you revisit your assumptions, you might find that your need is solved by a

Re: [SQL] Problems with NEW.* in triggers

2003-11-08 Thread Jamie Lawrence
On Tue, 04 Nov 2003, Tom Lane wrote: > Jamie Lawrence <[EMAIL PROTECTED]> writes: > > I don't understand why moddate isn't getting set to now() in the above. > > Josh fingered the problem there --- you need a BEFORE trigger if you > want to affect the data that

Re: [SQL] Problems with NEW.* in triggers

2003-11-04 Thread Jamie Lawrence
On Tue, 04 Nov 2003, Tom Lane wrote: > Jamie Lawrence <[EMAIL PROTECTED]> writes: > > I had thought that if moddate isn't included in an insert or update, > > that it would be null in the NEW context, > > No, it would be whatever the value to be assigned to the c

[SQL] Problems with NEW.* in triggers

2003-11-04 Thread Jamie Lawrence
timestamp_fn() returns opaque as ' begin if NEW.moddate is not null then return NEW; else NEW.moddate := now(); return NEW; end if; end ' language 'plpgsql'; With the same results.) Any thoughts

Re: [SQL] Auto-update a field when record is changed

2003-08-24 Thread Jamie Lawrence
tamp, create trigger blah_timestamp_tr before insert or update on blah for each row execute procedure timestamp_fn(); Make the obvious changes for only doing this on updates. Or am I misunderstanding your goal? -j -- Jamie Lawrence[EMAIL PRO

Re: [SQL] Fwd: Bad Join moment - how is this happening?

2003-08-01 Thread Jamie Lawrence
Sorry to be slow on responses... Thanks to everyone who replies. On Wed, 30 Jul 2003, Richard Huxton wrote: > On Wednesday 30 July 2003 21:07, Jamie Lawrence wrote: > > I fully admit that I've been staring at this too long, and simply don't > > understand what is wr

[SQL] Fwd: Bad Join moment - how is this happening?

2003-07-30 Thread Jamie Lawrence
| 1 | | | 1| foo (8 rows) I'm sure I'm being an idiot, but does anyone have a fix? Thanks. -j -- Jamie Lawrence[EMAIL PROTECTED] It it ain't broke, let me have a shot at it. ---

Re: [SQL] Odd problems with create rule

2003-07-25 Thread Jamie Lawrence
On Fri, 25 Jul 2003, Tomasz Myrta wrote: > Dnia 2003-07-25 23:38, U?ytkownik Jamie Lawrence napisa?: > >dlm(# values ( > >dlm(# new.projects._id, > ^ > >dlm(#

[SQL] Odd problems with create rule

2003-07-25 Thread Jamie Lawrence
w.document_type, dlm(# new.state, dlm(# new.machines_id, dlm(# new.phases_id ); ERROR: Namespace "*NEW*" does not exist dlm=# Thanks. -j -- Jamie Lawrence

[SQL] More plsql questions: updates on views

2003-07-23 Thread Jamie Lawrence
ught was to create a function to handle this tripped by an AFTER trigger. I've been reading up on dynamic execution from functions, but can't see how to access the SET clause or the WHERE clause. Is this possible? Is there any other way to get this effect? Thanks in adv