Hello,

Shridhar Daithankar wrote:

> Given recent discussions and my needs for enum support, I experimented a bit 
> and found that postgresql enums works perfectly as text. Essentially they are 
> predefined values of text.

Yes, now I see what you mean. Of course, with PostgreSQL you can 
transfer anything as text.

I was under the impression that what is required is the mapping between 
database enums and C++ enums, so that with your example:

> test=# create type enum1 as enum('enumval1','enumval2');
> CREATE TYPE

you would also have in C++:

enum enum1 { enumval1, enumval2 };

and the automagic mapping between these two.

When I answered that enums are not supported I meant that there is no 
out of the box mapping between the two above. Of course, you can 
implement it by hand for example by combining text transfer with user 
conversions.

Regards,

-- 
Maciej Sobczak * www.msobczak.com * www.inspirel.com

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to