Re: Using a Conversion Table - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: Using a Conversion Table
Date
Msg-id 20240216001216.kogrdgmpbklbyzyj@hjp.at
Whole thread Raw
In response to Re: Using a Conversion Table  (Greg Sabino Mullane <htamfids@gmail.com>)
List pgsql-general
On 2024-02-14 10:02:37 -0500, Greg Sabino Mullane wrote:
>         "Fiscal year" double precision,
>
> This column is an INTEGER in your other table, so your schema is not even
> internally consistent! Try to use TEXT, INT, DATE and TIMESTAMPTZ whenever
> possible,

While using double precision for fiscal year is rather grotesque
overkill (smallint would be sufficient) it isn't wrong: Any value you
could conceivably want to store for a fiscal year fits nicely (with lots
of room to spare) into a double precision.

I agree that consistency would be nice, though.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: How to do faster DML
Next
From: Jay Stanley
Date:
Subject: Re: PostgreSQL DB in prod, test, debug