Re: int8 sequences --- small implementation problem

From: Neil Padgett <npadgett(at)redhat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <JanWieck(at)yahoo(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: int8 sequences --- small implementation problem
Date: 2001-08-14 17:12:26
Message-ID: 3B795BFA.37EC642@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
[clip]
>
> This would work, I think, but my goodness it's an ugly solution.
> Has any hacker got a better one?
>
> regards, tom lane

How about:

#ifdef INT64_IS_BUSTED
#define int64aligned(name) int32 name##_; int64 name
#else
#define int64aligned(name) int64 name
#endif

typedef struct FormData_pg_sequence
{
NameData sequence_name;
int64aligned(last_value);
int64aligned(increment_by);
int64aligned(max_value);
int64aligned(min_value);
int64aligned(cache_value);
int64aligned(log_cnt);
char is_cycled;
char is_called;
} FormData_pg_sequence;

Neil

--
Neil Padgett
Red Hat Canada Ltd. E-Mail: npadgett(at)redhat(dot)com
2323 Yonge Street, Suite #300,
Toronto, ON M4P 2C9

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Blasby 2001-08-14 17:18:17 Forcing GiST index to be used
Previous Message Serguei Mokhov 2001-08-14 16:10:59 Re: int8 sequences --- small implementation problem