Re: Passing enum Parameters to User-defined C-Language Functions

2023-10-23 Thread Tom Lane
Albrecht =?iso-8859-1?b?RHJl3w==?= writes: > - How would a “mood” parameter be encoded when it is passed to the function? It's an OID, which you'd have to look up in the pg_enum catalog if you want to know the string representation. regards, tom lane

Passing enum Parameters to User-defined C-Language Functions

2023-10-23 Thread Albrecht Dreß
Hi, I have a (I hope not too dumb) question regarding the use of enum parameters in a user-defined function written in C, e.g. for the example given in [1]: CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy'); - How would a “mood” parameter be encoded when it is passed to the function? “Four byt