pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Eckermann <jeckermann@verio.net>
To: Jaydip <jaydip@ontrackindia.com>
To: pgsql-sql@postgresql.org
Subject: Re: Help On Postgresql
Date: Thu, 30 Aug 2001 13:16:13 -0500
Message-ID: <01d201c1317f$e0111cb0$279c10ac@INTERNAL> (raw)
References: <000801c12ba8$5924ab40$ca00a8c0@dewanji>

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 Types" section of the Users Guide.
  ----- Original Message ----- 
  From: Jaydip 
  To: pgsql-sql@postgresql.org 
  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 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

view thread (5+ messages)  latest in thread

Message-ID: <01d201c1317f$e0111cb0$279c10ac@INTERNAL>
Permalink:  ../01d201c1317f$e0111cb0$279c10ac@INTERNAL/
Also on:    postgresql.org/message-id/01d201c1317f$e0111cb0$279c10ac@INTERNAL

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jeckermann@verio.net, jaydip@ontrackindia.com
  Subject: Re: Help On Postgresql
  In-Reply-To: <01d201c1317f$e0111cb0$279c10ac@INTERNAL>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox