Search Postgresql Archives

Re: Calling function from VFP changes character field to Memo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/15/22 10:44 AM, Tom Lane wrote:
Frank Cazabon <frank.cazabon@xxxxxxxxx> writes:


Any idea what I need to do to get it to return the character(30) type?

There's no chance of getting back the "30" part with this structure,
because function signatures do not carry length restrictions.
What I expect is happening is that you get firstname as an
unspecified-length "character" type, and something on the client
side is deciding to cope with that by calling it "Memo" instead.

My experience is that frameworks 'see' ::text as Memo/Textarea and ::char/varchar as Input.


You could perhaps work around that by defining a named composite
type:

create type testfunction_result as (firstname character(30), ...);

create function testfunction() returns setof testfunction_result as ...

			regards, tom lane




--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux