Re: [SQL] Using substr with user defined types

2000-06-23 Thread D'Arcy J.M. Cain
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 th

Re: [SQL] Using substr with user defined types

2000-06-23 Thread Tom Lane
[EMAIL PROTECTED] (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

Re: [SQL] Using substr with user defined types

2000-06-23 Thread D'Arcy J.M. Cain
Thus spake Tom Lane > [EMAIL PROTECTED] (D'Arcy J.M. Cain) writes: > > Any ideas? > > Not with that much info. Sooner or later you're going to have to > show us your C code... Oh, sure. I was going to submit it to contrib when it was finished and as I said, the fprintf test I added pretty much

Re: [SQL] Using substr with user defined types

2000-06-22 Thread Tom Lane
[EMAIL PROTECTED] (D'Arcy J.M. Cain) writes: > Any ideas? Not with that much info. Sooner or later you're going to have to show us your C code... regards, tom lane

Re: [SQL] Using substr with user defined types

2000-06-22 Thread D'Arcy J.M. Cain
Thus spake Tom Lane > [EMAIL PROTECTED] (D'Arcy J.M. Cain) writes: > > create function chkpass_rout(opaque) > > returns opaque > > as '/usr/pgsql/modules/chkpass.so' > > language 'c'; > > > Here is what happens. > > > soccer=> select chkpass_rout('hello'::chkpass); > > ERROR: typeid