Re: dbimport 9.40 hates tables without owner names?
Posted in 2004
On Thu, 26 Aug 2004 20:21:36 -0400, Andrew Hamm wrote:
> Art S. Kagel wrote:
>>
>> Not to plug the product, especially since I don't get any $$ from it 8-(,
>> but myschema has options to output dbimport compatible schema files without
>> owner names and with the correct serial value initialized in the CREATE
>> TABLE statement.
>
> Have you noticed anything on 9.40.FC4 (and friends, I guess) which matches
> my experience?
>
> Also, can you explain to the forum where you are getting the serial number
> from? Are you using the old oncheck trick, or is there a newer way via
> sysmaster?
Myschema has three options for SERIAL type columns:
- if you specify -a alone it sets the serial value to MAX(colname)+1 and prints
out the value of sysptnhdr.serialv in a comment.
- if you specify -a with -c myschema sets serial value to sysptnhdr.serialv.
- if neither option is specified MAX(colname) + 1 is used without comment.
For SERIAL8 type columns, myschema uses MAX(colname) + 1 always as the
serial8 value is not directly accessible.
> Finally, what about the new SEQUENCE object.... They seem to have a fairly
> complex state, although I haven't used them yet.
For sequences there is no choice but to call the sequence_name.nextval
function which increments the sequence number. A sequence is implemented as
a table with a single SERIAL8 column. However, since you cannot include a
sequence table's name in the FROM clause of a query, no choice.
Art S. Kagel