| From: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Help request to improve function performance |
| Date: | 2009-04-23 09:00:59 |
| Message-ID: | 20090423090059.GB4500@merkur.hilbert.loc |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, Apr 23, 2009 at 12:02:13AM +0100, Seref Arikan wrote:
> I have a set of dynamically composed objects represented in Java, with
> string values for various attributes, which have variable length. In case
> you have suggestions for a better type for this case, it would be my
> pleasure to hear about them.
Seref, he's suggesting you use TEXT instead of
VARCHAR(something). In PG it's actually usually *less*
overhead to use the unbounded text datatype (no length check
required).
Length checks mandated by business logic can be added by
more dynamic means -- check constraints, triggers, etc which
allow for less invasive change if needed.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Willy-Bas Loos | 2009-04-23 09:08:43 | pg_lsclusters error after pg_dropcluster |
| Previous Message | Filip Rembiałkowski | 2009-04-23 08:57:43 | Re: Help request to improve function performance |