X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 980A4474E4F for ; Fri, 14 Feb 2003 07:38:50 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id E95AD475B8E for ; Fri, 14 Feb 2003 07:38:48 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h1ECcmf02988; Fri, 14 Feb 2003 07:38:48 -0500 (EST) From: Bruce Momjian Message-Id: <200302141238.h1ECcmf02988@candle.pha.pa.us> Subject: Re: Extending Datatype In-Reply-To: <001101c2d3ed$49ca74b0$2f437242@PASCAL> To: Wei Weng Date: Fri, 14 Feb 2003 07:38:48 -0500 (EST) Cc: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/329 X-Sequence-Number: 11727 Well, look in /contrib for some example data types. The job isn't trivial. Can you explain how UNIQUEIDENTIFIER is different from SERIAL? --------------------------------------------------------------------------- Wei Weng wrote: > I need to use the UNIQUEIDENTIFIER. There are other concerns in the database > design that makes using a serial type very inpractical. > > Is there easy example of writing a data type extension somewhere?? > > Thanks > > > Wei > > ----- Original Message ----- > From: "Bruce Momjian" > To: "Wei Weng" > Cc: > Sent: Thursday, February 13, 2003 6:06 PM > Subject: Re: [SQL] Extending Datatype > > > > > > Try the SERIAL data type. It uses sequences and DEFAULT. Read the FAQ. > > > > -------------------------------------------------------------------------- > - > > > > Wei Weng wrote: > > > Where can I find a more detailed doc on how to write module for extended > > > datatype? There isn't much about it on techdoc.postgresql.org. > > > > > > (I need to write one for UNIQUEIDENTIFIER.) > > > > > > Thanks! > > > > > > > > > Wei > > > > > > > > > > > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > > TIP 5: Have you checked our extensive FAQ? > > > > > > http://www.postgresql.org/users-lounge/docs/faq.html > > > > > > > -- > > Bruce Momjian | http://candle.pha.pa.us > > pgman@candle.pha.pa.us | (610) 359-1001 > > + If your life is a hard drive, | 13 Roberts Road > > + Christ can be your backup. | Newtown Square, Pennsylvania > 19073 > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 5: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/users-lounge/docs/faq.html > > > > > > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073