Re: Using substr with user defined types
От
Tom Lane
Тема
Re: Using substr with user defined types
Дата
Msg-id
18662.961775545@sss.pgh.pa.us
Ответ на
Re: Using substr with user defined types (darcy@druid.net (D'Arcy J.M. Cain))
Список
Дерево обсуждения
Using substr with user defined types darcy@druid.net (D'Arcy J.M. Cain)
Re: Using substr with user defined types Tom Lane <tgl@sss.pgh.pa.us>
Re: Using substr with user defined types darcy@druid.net (D'Arcy J.M. Cain)
Re: Using substr with user defined types Tom Lane <tgl@sss.pgh.pa.us>
Re: Using substr with user defined types Bruce Momjian <pgman@candle.pha.pa.us>
Re: Using substr with user defined types darcy@druid.net (D'Arcy J.M. Cain)
Re: Using substr with user defined types Tom Lane <tgl@sss.pgh.pa.us>
Re: Using substr with user defined types darcy@druid.net (D'Arcy J.M. Cain)
Re: Using substr with user defined types Tom Lane <tgl@sss.pgh.pa.us>
Re: Using substr with user defined types darcy@druid.net (D'Arcy J.M. Cain)
darcy@druid.net (D'Arcy J.M. Cain) writes:
>> Not with that much info. Sooner or later you're going to have to
>> show us your C code...
> char *
> chkpass_rout(chkpass *password)
> {
> char *result;
> if (password == NULL)
> return (NULL);
> if ((result = (char *) palloc(16)) != NULL)
> strcpy(result, password->password);
> return (result);
> }
That doesn't return "text", so you can't tell the system it does.
Type text is a varlena type, ie, length word followed by data.
regards, tom lane
В списке pgsql-sql по дате отправления