Re: Regarding varchar max length in postgres

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Regarding varchar max length in postgres
Date: 2018-10-15 15:37:00
Message-ID: CAKFQuwZ3dFsqRw+KwaWPWtxd0DL2cbRbZ8-5i91hUxNZc0KG8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Oct 15, 2018 at 8:24 AM Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com>
wrote:

> So i need unlimited length data type for required column of the table for
> storing the large values
> is there any issue to use unlimited length datatype text for the
> required column of the table instead of using varchar ?
>

Between the two you should use the "text" data type for those columns. You
will need to describe your use case in more detail if you want input as to
whether you need to use the large object API instead.

The database cannot store an unlimited amount of data in a single
row+column (cell) - you will still encounter a physical limit to the number
of bytes able to be stored in a single cell when using text.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Durgamahesh Manne 2018-10-15 15:56:12 Re: Regarding varchar max length in postgres
Previous Message Yuri Kanivetsky 2018-10-15 15:36:52 Re: Setting up continuous archiving