Re: [HACKERS] How do we find serial types

Поиск
Список
Период
Сортировка
От darcy@druid.net (D'Arcy J.M. Cain)
Тема Re: [HACKERS] How do we find serial types
Дата
Msg-id m0zXpIl-0000emC@druid.net
обсуждение исходный текст
Ответ на Re: [HACKERS] How do we find serial types  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
Ответы Re: [HACKERS] How do we find serial types
Список 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@{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.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ryan Kirkpatrick
Дата:
Сообщение: Re: [HACKERS] Last call?
Следующее
От: Sferacarta Software
Дата:
Сообщение: Re[2]: [HACKERS] Re: [INTERFACES] Odbc parser error