Re: Re: new type proposal
От | Dan Wilson |
---|---|
Тема | Re: Re: new type proposal |
Дата | |
Msg-id | 009701c0908d$8e195ff0$533987cf@corp.peoplesoft.com обсуждение исходный текст |
Ответ на | new type proposal (Joseph Shraibman <jks@selectacast.net>) |
Ответы |
Re: Re: new type proposal
Re: Re: new type proposal |
Список | pgsql-general |
: El Mar 06 Feb 2001 18:54, Dan Wilson escribió: : > I think these are vital! I was looking for something like this a few : > months ago and was frustrated that I had to create a trigger to accomplish : > this... I know, I'm lazy. But if it were built in, I think it would be a : > big bonus! : : Not at all. It would be a step back. What your asking for already exists, and : any ANSI-SQL book will tell you to do it with a trigger. : So wake up, don't be lazy, and CREATE those TRIGGERS!!! : : Saludos... ;-) I disagree! What would this do that would be non-standard? Does the SERIAL datatype add something that is not standard? No... it just allows for an easy way to implement something that is standard. The SERIAL "type" isn't really a datatype, it's just a keyword that allows you to automatically specify an int4 column with a related sequence and default. I don't see why the same thing couldn't be done with TIMESTAMP! I'm not saying to create an actual datatype that is called TIMESTAMP or LAST_MODIFIED, just use it in a create script. It would then be implemented with the DATE datatype combined with triggers. Makes perfect sense to me! -Dan BTW: I'm completely awake and I build applications specifically so I don't have to do things by hand (ie. so I can be "lazy" or more efficient, whichever you prefer).
В списке pgsql-general по дате отправления: