Re: Using substr with user defined types - Mailing list pgsql-sql

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: Using substr with user defined types
Date
Msg-id m135WU2-000AY6C@druid.net
Whole thread Raw
In response to Re: Using substr with user defined types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Thus spake Tom Lane
> > char *
> > chkpass_rout(chkpass *password)
> 
> 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.

Ack!  That was it.  I don't understand why it didn't print my debug
message at the start of the function.  I used "fprintf(stderr, ..."
at the start of the function to make sure that it wasn't gobbled
up by buffering or something.  When I didn't see my message I just
assumed that it had to come from the engine.

Thanks.  I was able to dig out what changes I needed for the operator
stuff from the docs (I needed scalar??sel instead of int??sel) and
now everything I had before plus the chkpass stuff works.  I'll
send the corrected chkpass stuff for contrib and work on that phone
number item I mentioned in another message.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-sql by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: Orderby two different columns
Next
From: Jeff MacDonald
Date:
Subject: query failed , don't know why