Re: Too short field

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Too short field
Date: 2019-07-03 22:22:47
Message-ID: b818a43f-a13b-33a3-1375-fbd0bd569049@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/07/2019 23:30, Karl Martin Skoldebrand wrote:
>
> Hi,
>
> We solved the problem of yesterday where I was looking at sequences.
> It eventually turned that sequence was irrelevant (at least in the
> PostgreSQL sense) to the problem.
>
> Now, we have a bug in another application that prevents an automatic
> tool to enter certain users in the database. The organisational field
> is varchar(60) while the actual Organisation “abbreviation” may be as
> long as 70 characters (don’t ask why).
>
> What happens to data if I simple redefine the table field as
> varchar(80) (or something, at least 70+). Does “everything” break
> database side or can I just go on running the app as is.
>
> Do we need to restart databases or something else that requires an
> interrupted service?
>
> Best regards,
>
> Martin S
>
> ============================================================================================================================
>
> Disclaimer:  This message and the information contained herein is
> proprietary and confidential and subject to the Tech Mahindra policy
> statement, you may review the policy at
> http://www.techmahindra.com/Disclaimer.html externally
> http://tim.techmahindra.com/tim/disclaimer.html internally within
> TechMahindra.
>
> ============================================================================================================================
>
Is there any reason to put a limit of the number of characters in the
field in the database?

If not, consider using, the 'text' type.

Cheers,
Gavin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Souvik Bhattacherjee 2019-07-04 01:11:43 Re: Allocating shared memory in Postgres
Previous Message Tom Lane 2019-07-03 22:18:32 Re: postgres 11 issue?