>Trigger based solution where same trig can be used for any number of
tables by changing the parameter.
>Will throw one of 2 exceptions on failure to use sequence for the
insert.
Many thanks,
This seems to be the simplest solution,
Marc
---(end of broadcast)-
Thanks for this hint, I'll try to do this. Is there any change you could send
me your 02:00 AM script so that i use something *I know* is already working?
Perhaps off the mailing list, since maybe not everyone will enjoy code on
their mail.
Thanks.
On Wednesday 13 December 2006 06:21, Andy She
create table mytable (myid serial primary key constraint
mytable_myid_chk check
(myid = currval('mytable_myid_seq'), mydata varchar(255), ...);
I'd like to clarify that this will not be a full solution, since it will
not allow update of the table unless nextval has been used in the same
s
"Ben K." <[EMAIL PROTECTED]> writes:
> > create table mytable (myid serial primary key constraint
> mytable_myid_chk check (myid = currval('mytable_myid_seq'), mydata
> varchar(255), ...);
>
>
> I'd like to clarify that this will not be a full solution, since it
> will not allow update of the ta
> It's not a full solution anyway since it prevents any kind of update
on the table due to check constraints firing even if target field not
updated. >
Well, we can extend the check within the trigger:
if (coalesce old.a=new.a -- Update
OR
new.a = currval(tg_argv[0] -- Insert
) then
It's not a full solution anyway since it prevents any kind of update
on the table due to check constraints firing even if target field not
updated. See below;
Right. It was not a valid idea ...
Regards,
Ben K.
Developer
http://benix.tamu.edu
---(end of broadcast)---
unsubscribe
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
- --On Thursday, December 14, 2006 10:23:04 -0500 Lane Van Ingen
<[EMAIL PROTECTED]> wrote:
>
> Can I tell what version of the server I am running FOR SURE by using the
> command ‘psql --version’ ??
>
> I am running 8.0.? on Windows 2003.
try:
ps
Hello everyone,
I'm trying to change the SYSID in pg_control (at least I think that is
where it is) due to a catastrophic backup system failure, combined with
a timely administrative "oops". Does anyone know how I might go about
doing that?
The back story, for those interested:
We lost *all* of
Joshua Colson <[EMAIL PROTECTED]> writes:
> So I thought I would try to change the SYSID to 4965793265546637307 and
> have another shot at it.
> I'm not a PG guru so please let me know, is there any chance that what
> I'm doing will be successful, or am I just wasting my time?
You'd have to modify
10 matches
Mail list logo