X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D76F4D918B for ; Wed, 9 Nov 2005 10:01:58 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 50022-04 for ; Wed, 9 Nov 2005 14:01:54 +0000 (GMT) X-Greylist: delayed 00:06:40.223739 by SQLgrey- Received: from web51114.mail.yahoo.com (web51114.mail.yahoo.com [206.190.39.91]) by svr1.postgresql.org (Postfix) with SMTP id 1E8F4D893A for ; Wed, 9 Nov 2005 10:01:54 -0400 (AST) Received: (qmail 47674 invoked by uid 60001); 9 Nov 2005 13:55:18 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Qkl1wsPPLilp3zkOiTvJBau6tEhOybl91W1NjVoQBXFQKMB1B/WoDIsAVR/QEcYA+Ag4kQyw29kFbz7QeToJN3nnbpm1kToTy6dpRyWLxjM6SU3VSIhTeOOx/YRTowvMikTJgmx4UPksossSBrDRBnE5CedxZzQNht4Kaeap+kg= ; Message-ID: <20051109135518.47672.qmail@web51114.mail.yahoo.com> Received: from [203.200.181.87] by web51114.mail.yahoo.com via HTTP; Wed, 09 Nov 2005 05:55:18 PST Date: Wed, 9 Nov 2005 05:55:18 -0800 (PST) From: zenith Das Subject: migratation of database from oracle9i to postgreSQL8.0.3 To: Jaime Casanova , "lucas@presserv.org" Cc: pgsql-sql@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1017214192-1131544518=:46958" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.454 required=5 tests=[AWL=-0.026, DNS_FROM_RFC_ABUSE=0.479, HTML_MESSAGE=0.001] X-Spam-Score: 0.454 X-Spam-Level: X-Archive-Number: 200511/75 X-Sequence-Number: 23326 --0-1017214192-1131544518=:46958 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Can anyone help me out........ How can i migrate database from oracle9i to postgreSQL8.0.3 where the table structure may differ in certain way............... Jaime Casanova wrote: On 11/8/05, lucas@presserv.org wrote: > Hi > Looking the e-mail I remembered a question. > I saw that "select extract (week from now()::date)" will return the > week number > of current year. But, how can I convert a week to the first reference > date. Ex: > select extract(week from '20050105'::date); -- 5 Jan 2005 > --Returns-- > date_part | > 1 | > > It is the first week of year (2005), and how can I get what is the first date > references the week 1? Ex: > select ???? week 1 > --should return--- > date | > 20050103 | -- 3 Jan 2005 > > Thank you. > Lucas Vendramin > > Extracted from: http://www.postgresql.org/docs/8.0/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT --- begin extracted text --- week The number of the week of the year that the day is in. By definition (ISO 8601), the first week of a year contains January 4 of that year. (The ISO-8601 week starts on Monday.) In other words, the first Thursday of a year is in week 1 of that year. (for timestamp values only) Because of this, it is possible for early January dates to be part of the 52nd or 53rd week of the previous year. For example, 2005-01-01 is part of the 53rd week of year 2004, and 2006-01-01 is part of the 52nd week of year 2005. SELECT EXTRACT(WEEK FROM TIMESTAMP '2001-02-16 20:38:40'); Result: 7 --- end extracted text --- -- regards, Jaime Casanova (DBA: DataBase Aniquilator ;) ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. --0-1017214192-1131544518=:46958 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi
 Can anyone help me out........
How can i migrate database from oracle9i to postgreSQL8.0.3 where the table structure may differ in certain way...............



Jaime Casanova <systemguards@gmail.com> wrote:
On 11/8/05, lucas@presserv.org wrote:
> Hi
> Looking the e-mail I remembered a question.
> I saw that "select extract (week from now()::date)" will return the
> week number
> of current year. But, how can I convert a week to the first reference
> date. Ex:
> select extract(week from '20050105'::date); -- 5 Jan 2005
> --Returns--
> date_part |
> 1 |
>
> It is the first week of year (2005), and how can I get what is the first date
> references the week 1? Ex:
> select ???? week 1
> --should return---
> date |
> 20050103 | -- 3 Jan 2005
>
> Thank you.
> Lucas Vendramin
>
>

Extracted from:
http://www.postgresql.org/docs/8.0/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT

--- begin extracted text ---

week
The number of the week of the year that the day is in. By definition
(ISO 8601), the first week of a year contains January 4 of that year.
(The ISO-8601 week starts on Monday.) In other words, the first
Thursday of a year is in week 1 of that year. (for timestamp values
only)

Because of this, it is possible for early January dates to be part of
the 52nd or 53rd week of the previous year. For example, 2005-01-01 is
part of the 53rd week of year 2004, and 2006-01-01 is part of the 52nd
week of year 2005.

SELECT EXTRACT(WEEK FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 7

--- end extracted text ---

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Yahoo! FareChase - Search multiple travel sites in one click. --0-1017214192-1131544518=:46958--