Re: [HACKERS] How do we find serial types

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] How do we find serial types
Date: 1998-10-26 16:15:27
Message-ID: m0zXpIl-0000emC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thus spake Thomas G. Lockhart
> > I guess it's too late for 6.4 so hopefully there is already a way to
> > find out whether a field was declared as a serial type. Am I stuck
> > using some sort of index name hack?
>
> Probably. I did the serial type implementation as a hash of hooks I
> already had in the backend (and at the behest of others, so don't blame
> me too much :). It isn't integrated as well as it could/should be, and
> we should clean this up for v6.5.

That would be good. Mostly I am interested in knowing that it was
declared serial in order to write generic forms handlers and such.
Basically I want to not insert values into serial types so that the
system will generate the sequential number.

Actually, there is another way to do this. If the system were to always
generate a sequential number on insert and ignore any value specified, that
would work to. Unfortunately that wouldn't work on a dump and restore.

> It actually might be related to what we will need to do for primary and
> foreign keys, so might get fixed with that stuff. Jan has indicated an
> interest in pursuing some of this through the rules system.

At least with the primary key there is a field so we can kluge it. I
wrote some documentation that you should now have explaining how to do that.

Argh! I fscked up! I sent the docs to Tom Ivar Helbekkmo by mistake
because he sent me the inet skeleton docs. He explained the error but
I misread his message. I thought he was sending it on to you but he
said for me to send it on. I'll get that to you right away. Sorry
about that. I'll bounce you those messages right away. Did you get the
inet/cidr regression test queries? I'll bounce that message to you too
just in case.

And I was so happy that I got everything in before the Friday date.

--
D'Arcy J.M. Cain <darcy(at){druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sferacarta Software 1998-10-26 16:22:25 Re[2]: [HACKERS] Re: [INTERFACES] Odbc parser error
Previous Message Ryan Kirkpatrick 1998-10-26 15:45:12 Re: [HACKERS] Last call?