pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [SQL] how to change the type
Date: Fri, 7 Dec 2001 13:41:46 -0800 (PST)
Message-ID: <20011207132327.H38113-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <29705.1007739373@sss.pgh.pa.us>

On Fri, 7 Dec 2001, Tom Lane wrote:

> Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> > Going down is
> > problematic, because if you have a varchar(5) field where one value is say
> > 'abcd' and you make it varchar(3) what happens?
>
> What would actually happen right now is nothing: the value would still
> be 'abcd' and would still read out that way.  The 3-char limit would
> only get enforced during inserts and updates of the column.

That's what I figured, but I also assume that'd be "wrong" in a pure sense
since the value is invalid for the new datatype, so I figure its safer
to say up only. :)




view thread (5+ messages)  latest in thread

Message-ID: <20011207132327.H38113-100000@megazone23.bigpanda.com>
Permalink:  ../20011207132327.H38113-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20011207132327.H38113-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, tgl@sss.pgh.pa.us, chriskl@familyhealth.com.au, pgsql-hackers@postgresql.org
  Subject: Re: [SQL] how to change the type
  In-Reply-To: <20011207132327.H38113-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox