Hi! I'm working with PostgreSQL to create some data types written in C.
For example, I have:
typedef struct Point3D
{
char id[50];
double x;
double y;
double z;
} Point3D;
The input and output functions are working properly.
But the problem is the following: Every id of Point3D must be unique (and can be NULL), so I have decided to create an unique index on this field id, but is that possible?
I'm thinking in something like this: create unique index test_point3d_idx on test_point3d (( getID(columname) )); where getID returns the field ID of columname.
But I need to implement getID and I am really blocked.
Any advice?