Re: Returning a char from a C-language function - Mailing list pgsql-general

From Tom Lane
Subject Re: Returning a char from a C-language function
Date
Msg-id 15848.1271884096@sss.pgh.pa.us
Whole thread Raw
In response to Returning a char from a C-language function  ("I. B." <i.bre@live.com>)
List pgsql-general
"I. B." <i.bre@live.com> writes:
> I have a small problem when trying to make a C-language function to return one character. The code is very simple and
that'swhat's making it so strange. 

> CREATE FUNCTION val(ibool)
>      RETURNS char

You need to write "char", with the quotes.  Without the quotes the type
name is taken as CHARACTER(1), ie what's internally called BpChar.
Totally different animal.

            regards, tom lane

pgsql-general by date:

Previous
From: "Mark Watson"
Date:
Subject: Re: Avoiding surrogate keys
Next
From: Thom Brown
Date:
Subject: Listing tables in all schemas in psql