Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.4) with SMTP id f7UEgTf41991 for ; Thu, 30 Aug 2001 10:42:29 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from mail3.registeredsite.com (mail3.registeredsite.com [64.224.9.12]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7N7mBP29599 for ; Thu, 23 Aug 2001 03:48:11 -0400 (EDT) (envelope-from jaydip@ontrackindia.com) Received: from mail.ontrackindia.com (mail.ontrackindia.com [216.247.40.229]) by mail3.registeredsite.com (8.11.4/8.11.4) with ESMTP id f7N6nj306031 for ; Thu, 23 Aug 2001 02:49:45 -0400 Received: from dewanji [216.247.40.229] by mail.ontrackindia.com (SMTPD32-6.06) id A531319E00FC; Thu, 23 Aug 2001 03:48:01 -0400 Message-ID: <000801c12ba8$5924ab40$ca00a8c0@dewanji> From: "Jaydip" To: Subject: Help On Postgresql Date: Thu, 23 Aug 2001 13:20:52 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0005_01C12BD6.6F0AF7B0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Archive-Number: 200108/366 X-Sequence-Number: 4625 This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C12BD6.6F0AF7B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 Da= te/DateTime variable. For Example : i> In Oracle to_char(dt,'yyyy') - for extracting the year= value from a date variable dt ii> In SqlServer datepart(hh,dt) - for extracting = the Hour value from a date variable dt b) Can I create an identity column in Postgresql the value of which column = 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_0005_01C12BD6.6F0AF7B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear Friends
 
I am Jaydip Dewanji working as a Sr. Progr= ammer for=20 Ontrack Systems Ltd.
 
I have some questions regarding Postgresql= 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> In = 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 extracti= ng=20 the Hour value from a date variable dt
 
b) Can I create an identity column in Post= gresql=20 the value of which column will start from 1 say and keep
    on incrementing by 1 OR= how can=20 I serve my purpose in any other way.
 
 
Please do let me know if any one of you ha= ve any=20 solution.
 
Regards
 
Jaydip
------=_NextPart_000_0005_01C12BD6.6F0AF7B0--