Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » PostgreSQL issues
PostgreSQL issues [message #9654] Wed, 23 May 2007 22:34 Go to previous message
zsolt is currently offline  zsolt
Messages: 698
Registered: December 2005
Location: Budapest, Hungary
Contributor
I have checked current version and found some strange things. In PostgreSQLSchema.h there ar some buggy lines:
#define SERIAL(x)                  COLUMN("integer autoincrement", int64, x, 0, 0) //int is not enough, as it is unsigned
#define SERIAL_ARRAY(x, items)     COLUMN_ARRAY("integer autoincrement", int64, x, 0, 0, items)
#define SERIAL_(x)                 COLUMN_("integer autoincrement", int64, x, 0, 0)
#define SERIAL_ARRAY_(x, items)    COLUMN_ARRAY_("integer autoincrement", int64, x, 0, 0, items)

#define BIGSERIAL(x)               COLUMN("integer autoincrement", int64, x, 0, 0)
#define BIGSERIAL_ARRAY(x, items)  COLUMN_ARRAY("integer autoincrement", int64, x, 0, 0, items)
#define BIGSERIAL_(x)              COLUMN_("integer autoincrement", int64, x, 0, 0)
#define BIGSERIAL_ARRAY_(x, items) COLUMN_ARRAY_("integer autoincrement", int64, x, 0, 0, items)

The above lines would be useful in SQLite (I wanted to propose it), but not in PG. The correct lines would be:
#define SERIAL(x)                  COLUMN("serial", int64, x, 0, 0) //int is not enough, as it is unsigned
#define SERIAL_ARRAY(x, items)     COLUMN_ARRAY("serial", int64, x, 0, 0, items)
#define SERIAL_(x)                 COLUMN_("serial", int64, x, 0, 0)
#define SERIAL_ARRAY_(x, items)    COLUMN_ARRAY_("serial", int64, x, 0, 0, items)

#define BIGSERIAL(x)               COLUMN("bigserial", int64, x, 0, 0)
#define BIGSERIAL_ARRAY(x, items)  COLUMN_ARRAY("bigserial", int64, x, 0, 0, items)
#define BIGSERIAL_(x)              COLUMN_("bigserial", int64, x, 0, 0)
#define BIGSERIAL_ARRAY_(x, items) COLUMN_ARRAY_("bigserial", int64, x, 0, 0, items)


I would propose some other lines to SQLite for compatibility with PostgreSQL:
#define CLOB(x)                    COLUMN("text", String, x, 0, 0)
#define CLOB_(x)                   COLUMN_("text", String, x, 0, 0)

[Updated on: Wed, 23 May 2007 22:36]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to access a firebird database ?
Next Topic: Returning a null from select
Goto Forum:
  


Current Time: Tue May 14 15:33:33 CEST 2024

Total time taken to generate the page: 0.02897 seconds