Home » U++ Library support » U++ SQL » PostgreSQL Support Classes [Experimental]
Re: PostgreSQL Support Classes [Experimental] [message #9076 is a reply to message #9065] |
Mon, 16 April 2007 19:44 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
unodgs wrote on Mon, 16 April 2007 06:13 |
Quote: | Obviously, not as sexy as simply puttin more "PRIMARY_KEY" columns, OTOH at least Oracle SQL syntax is similar - you have to add it in single contraint, not as several "PRIMARY_KEY" comlums.
|
If databse is SQL 92 compatible there is posibility to define primary key in single line. It seems that most of db engines support it.
create table t
(
id integer,
ver integer,
type integer,
...,
primary key(id, ver, type)
)
|
Sure, above is a direct equivalent of what have now. SQL allows to define single-column keys in the column and multi-column keys as additional contraint...
Quote: |
I proposed putting PRIMARY_KEY attribute next to every column to avoid several macros.
Of course I don't know if it is possible to implement it using c preprocessor.
|
You would have radically change schema code, but I guess it is possible somehow.
Quote: |
If not - I suggest to get rid of primary_key attribute as well as DUAL_PRIMARY_KEY and define new macro
PRIMARY_KEY(...) which allow you to define primary key for maximum 5 columns.
|
Well, but C++ does not have variadic macros (yet?).
BTW, I have just checked and I have used DUAL_PRIMARY_KEY once in my "grand IDIS DB schema" of 500 tables... (OTOH, it is also true that I perhaps deliberately avoid it).
My suggestion is to use current way for now; maybe we can do better when we have all RDBMs implemented and have some experience with it; maybe we will then develop some "common .sch language" to have single .sch for all of them.
Mirek
|
|
|
|
|
PostgreSQL Support Classes [Experimental]
By: zsolt on Sun, 15 April 2007 00:28
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: unodgs on Sun, 15 April 2007 09:11
|
|
|
Re: PostgreSQL Support Classes [Experimental]
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mirek on Sun, 15 April 2007 16:02
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: zsolt on Sun, 15 April 2007 17:44
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: unodgs on Sun, 15 April 2007 20:25
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: unodgs on Sun, 15 April 2007 20:49
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: zsolt on Sun, 15 April 2007 20:59
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: zsolt on Sun, 15 April 2007 21:04
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: zsolt on Sun, 15 April 2007 21:18
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mirek on Mon, 16 April 2007 09:20
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: unodgs on Mon, 16 April 2007 10:22
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mirek on Mon, 16 April 2007 10:37
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: unodgs on Mon, 16 April 2007 12:13
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mirek on Mon, 16 April 2007 19:44
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: unodgs on Mon, 16 April 2007 20:11
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mirek on Mon, 16 April 2007 20:37
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: unodgs on Mon, 16 April 2007 22:42
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mirek on Tue, 17 April 2007 00:01
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: zsolt on Mon, 16 April 2007 19:43
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: jibe on Mon, 16 April 2007 18:46
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: zsolt on Mon, 16 April 2007 19:57
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: jibe on Tue, 17 April 2007 09:08
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mirek on Tue, 17 April 2007 11:53
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: jibe on Wed, 18 April 2007 08:57
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: tojocky on Thu, 01 May 2008 16:53
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mirek on Thu, 01 May 2008 22:55
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: tojocky on Sun, 04 May 2008 10:15
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: zsolt on Sun, 04 May 2008 11:24
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: tojocky on Mon, 05 May 2008 17:12
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mr_ped on Mon, 05 May 2008 20:59
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mirek on Mon, 05 May 2008 22:14
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: tojocky on Tue, 06 May 2008 17:24
|
|
|
Re: PostgreSQL Support Classes [Experimental]
By: mirek on Tue, 06 May 2008 19:45
|
Goto Forum:
Current Time: Tue May 14 15:03:56 CEST 2024
Total time taken to generate the page: 0.01442 seconds
|