[GSoC] create type questions

From: Charles Cui <charles(dot)cui1984(at)gmail(dot)com>
To: Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, Aleksandr Parfenov <a(dot)parfenov(at)postgrespro(dot)ru>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [GSoC] create type questions
Date: 2018-06-02 00:59:46
Message-ID: CA+SXE9s6Qm-x0DrYYk0wifqgHR91xBQ8FruopCznoT8FLQp_kg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi mentors and hackers,

I have a new type defined like this
CREATE TYPE thrift_binary (
INPUT = thrift_binary_in,
OUTPUT = thrift_binary_out,
LIKE = bytea
);
in thrift_binary_in, it accepts cstring and returns thrift_binary. And in
this function I returned a bytea because the create type tells the system
thrift_binary and bytea are the same. However, the test passes only when I
explicitly tell thrift_binary_in to return a bytea (change the return type
from thrift_binary to bytea), and it does not work when returns
thrift_binary.
Any ideas why?

Thanks, Charles.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2018-06-02 01:19:29 Re: New committers announced at PGCon 2018
Previous Message Jaime Casanova 2018-06-01 23:31:49 Re: New committers announced at PGCon 2018