On Sun 01 Feb 2004 22:33, Tim Bunce <[EMAIL PROTECTED]> wrote:
> Which databases cannot accept, and do something reasonable, with a
> VARCHAR field declaration of 1024 characters?
� Unify does not have varchar fields;
� Unify supports 'char' which has only fixed width
(with a maximum of 255) the help states that the width is
optional, but the docs say nothing about what happens if you
leave it off. Trial and terror tells me that if one omits the
length, it is the same as char (1);
� Unify supports 'text' which has no dimension and could be read
as varchar (unlimited);
� Unify sopports 'binary' which has no dimension, and could be
used for arbitrary data like images
� Unify supports 'byte' with an optional integer *without* parens
I've never used this, and a quick browse in the docs does not
reveal what it should do.
--8<---
sql> help data_type;
--- data type
Interactive SQL/A supports the following column data types:
- [HUGE] AMOUNT [(integer[,2])]
- BINARY
- BYTE [integer]
- CHAR[ACTER] [(integer)]
- CURRENCY [(integer[,integer])]
- [HUGE] DATE
- DEC[IMAL] [(integer)]
- DOUBLE PRECISION
- FLOAT
- HUGE INTEGER
- INT[EGER]
- NUMERIC [(integer)]
- REAL
- SMALLINT
- TEXT
- TIME
Refer to the UNIFY DataServer manuals for more details.
SEE ALSO: binary, column_options, COLUMNS, CREATE_TABLE, text
-->8---
> The question is carefully worded because I'm *not* asking for databases
> that support VARCHAR(1024) as a valid VARCHAR length, allthough it
> might seems like it :)
>
> I'm asking which databases would either give an error or truncate the
> data when presented with these two statements:
>
> CREATE TABLE foo (
> bar VARCHAR(1024)
> );
>
> INSERT INTO foo (bar) VALUES ('...1024 characters...');
>
> For example, MySQL only supports VARCHAR fields up to 255 characters,
> but will pass the test above because it'll silently convert VARCHAR(1024)
> into a TEXT type column (ie a LONG).
>
> So, back to the original question: Which databases cannot accept,
> and do something reasonable, with a VARCHAR field declaration of
> 1024 characters?
>
> Tim.
>
> p.s. You can keep the answers terse.
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.0 & 633 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.024 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/