Thread: varchar to text

varchar to text

From
Zlatko Matić
Date:
Hello.
 
There are some columns in my tables that I should change from varchar to text, in order to have enough space for long textual commentaries.
Before I do that, I would like to know is there any restriction regarding text type in comparison to varchar type?
Especially concerning triggers and rules ?
Namely, I have triggers that perform audit trail of all my tables, so I'm concerned whether it will work for text type fields ?
 
One additional question is regarding my MS Access front-end. Would it be a problem for Access ?
 
Thanks in advance,
 
Zlatko

Re: varchar to text

From
Martijn van Oosterhout
Date:
On Sun, Oct 02, 2005 at 11:37:10AM +0200, Zlatko Mati? wrote:
> There are some columns in my tables that I should change from varchar to text, in order to have enough space for long
textualcommentaries.  
> Before I do that, I would like to know is there any restriction regarding text type in comparison to varchar type?
> Especially concerning triggers and rules ?
> Namely, I have triggers that perform audit trail of all my tables, so I'm concerned whether it will work for text
typefields ? 

The varchar type is text plus restrictions. So no, switching to text
lets you do more, not less...

> One additional question is regarding my MS Access front-end. Would it be a problem for Access ?

The ODBC driver has something like "map text to memo". Make sure that's
off, otherwise access won't let you do comparisons on it.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment