Re: Check column result size in functions

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Check column result size in functions
Date: 2023-12-12 22:29:27
Message-ID: CAKFQuwY7jUtkV6YfJfTAVqQ2oys4cX0byzWC2JWyUTHWDafcqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 12, 2023 at 3:13 PM Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> wrote:

> My functions should return varchar(5) or should return an exception, but
> sometimes they return CHARACTER VARYING. Why ?
>
> thanks for any explanation
>

The observed behavior is documented.

https://www.postgresql.org/docs/current/sql-createfunction.html (see notes)

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2023-12-12 22:56:32 Re: how can I fix my accent issues?
Previous Message Marcos Pegoraro 2023-12-12 22:13:02 Check column result size in functions