Received: from akirason.se.verio.net (akirason.se.verio.net [204.27.64.122]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7UIGef21668 for ; Thu, 30 Aug 2001 14:16:40 -0400 (EDT) (envelope-from jeckermann@verio.net) Received: from beancounter (no-wkstns.gs.verio.net [204.27.67.225]) (authenticated) by akirason.se.verio.net (8.11.4/8.11.4) with ESMTP id f7UIGrI68900; Thu, 30 Aug 2001 13:16:54 -0500 (CDT) (envelope-from jeckermann@verio.net) Message-ID: <01d201c1317f$e0111cb0$279c10ac@INTERNAL> From: "Jeff Eckermann" To: "Jaydip" , References: <000801c12ba8$5924ab40$ca00a8c0@dewanji> Subject: Re: Help On Postgresql Date: Thu, 30 Aug 2001 13:16:13 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01CB_01C13155.F1AC59F0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200108/372 X-Sequence-Number: 4631 This is a multi-part message in MIME format. ------=_NextPart_000_01CB_01C13155.F1AC59F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable a) Look at "Date/Time Functions" in the docs: specifically, listed under "= Functions and Operators" in the Users Guide. b) "Serial" type will do this. Look under "Numeric Types" , in the "Data T= ypes" section of the Users Guide. ----- Original Message -----=20 From: Jaydip=20 To: pgsql-sql@postgresql.org=20 Sent: Thursday, August 23, 2001 2:50 AM Subject: Help On Postgresql Dear Friends I am Jaydip Dewanji working as a Sr. Programmer for Ontrack Systems Ltd. I have some questions regarding Postgresql which are listed below: a) How do I retrieve the Year,Month,Day,Hr,Minute or Second value from a = Date/DateTime variable. For Example : i> In Oracle to_char(dt,'yyyy') - for extracting the ye= ar value from a date variable dt ii> In SqlServer datepart(hh,dt) - for extractin= g the Hour value from a date variable dt b) Can I create an identity column in Postgresql the value of which colum= n will start from 1 say and keep on incrementing by 1 OR how can I serve my purpose in any other way. Please do let me know if any one of you have any solution. Regards Jaydip ------=_NextPart_000_01CB_01C13155.F1AC59F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
a)  Look at "Date/Time Functions" in = the docs:=20 specifically, listed under "Functions and Operators" in the Users=20 Guide.
b) "Serial" type will do this.  Look = under=20 "Numeric Types" , in the "Data Types" section of the Users Guide.
----- Original Message -----
Fro= m:=20 Jaydip
To: pgsql-sql@postgresql.org
Sent: Thursday, August 23, 2001 2:= 50=20 AM
Subject: Help On Postgresql

Dear Friends
 
I am Jaydip Dewanji working as a Sr. Pro= grammer=20 for Ontrack Systems Ltd.
 
I have some questions regarding Postgres= ql which=20 are listed below:
 
a) How do I retrieve the Year,Month,Day,= Hr,Minute=20 or Second value from a Date/DateTime variable.
 
    For Example : i> I= n Oracle=20 to_char(dt,'yyyy') - for extracting the year value from a date variable= =20 dt
       =20            =20      ii> In SqlServer datepart(hh,dt) - for extrac= ting=20 the Hour value from a date variable dt
 
b) Can I create an identity column in Po= stgresql=20 the value of which column will start from 1 say and keep
    on incrementing by 1 = OR how=20 can I serve my purpose in any other way.
 
 
Please do let me know if any one of you = have any=20 solution.
 
Regards
 
Jaydip
<= /HTML> ------=_NextPart_000_01CB_01C13155.F1AC59F0--