From: | Edmund Dengler <edmundd(at)eSentire(dot)com> |
---|---|
To: | Bartlomiej Frackiewicz <frackiewicz(at)inity(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Rollback when value too long |
Date: | 2003-05-16 14:12:55 |
Message-ID: | Pine.BSO.4.44.0305161011060.6656-100000@cyclops4.esentire.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Not sure if this has been mentioned: any chance of doing it via a view?
Caveat: not sure when any form of length checking will take place.
Create a view, with an insert rule to perform the real insert into the
underlying table, and truncate in the rule function.
Regards!
Ed
On Fri, 16 May 2003, Bartlomiej Frackiewicz wrote:
> Hi,
>
> thanks for answering. Sure Perl can (handmade, DBI do not support this, or i am blindly), but i was in hope that i can solve this with the DB.
>
> Anyway, thanks.
>
> Bart
>
> -----Ursprngliche Nachricht-----
> Von: Nigel J. Andrews [mailto:nandrews(at)investsystems(dot)co(dot)uk]
> Gesendet: Freitag, 16. Mai 2003 14:04
> An: Bartlomiej Frackiewicz
> Cc: pgsql-general(at)postgresql(dot)org
> Betreff: Re: [GENERAL] Rollback when value too long
>
>
> On Fri, 16 May 2003, Bartlomiej Frackiewicz wrote:
>
> > Hi,
> >
> > we are using "PostgreSQL 7.3.1 on i386-pc-linux-gnu" with Perl DBI.
> >
> > Some tables where directly updated from web forms, so when the input
> > is longer than the fileld, Postgres forces a rollback. This might be
> > right, but is very angry for me. Is there a way to teach Postgres
> > that it must truncate these values?
>
> No. Can't the perl code truncate them?
>
>
> --
> Nigel Andrews
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pedro C. Arias | 2003-05-16 14:18:01 | Re: [GENERAL] why www.postgresql.org is not working |
Previous Message | greg | 2003-05-16 14:08:06 | Re: [GENERAL] why www.postgresql.org is not working |