Re: [SQL] Table PARTITION

2005-04-07 Thread Dinesh Pandey
Yes, I will do in this way Thanks Dinesh Pandey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Enrico Weigelt Sent: Friday, April 08, 2005 7:18 AM To: pgsql-sql@postgresql.org Subject: Re: [SQL] Table PARTITION * Richard Huxton wrote: > Sean Davi

Re: [SQL] Table PARTITION

2005-04-07 Thread Enrico Weigelt
* Richard Huxton wrote: > Sean Davis wrote: > >This is a totally selfish question, but IF someone has a few minutes, > >could he/she explain why table partitioning is such an important tool? > > Say you have a large log-table, you could partition it by month. If most > queries only search the l

[SQL] Question on triggers and plpgsql

2005-04-07 Thread Carlos Moreno
Hello, A question from a complete newbie on this area. I'm trying to implement a mechanism that would allow me to keep track of the last time each row of a table was modified. I have many applications modifying the data, and I would like to avoid having to modify each of those applications (with th

Re: [SQL] DROP TYPE without error?

2005-04-07 Thread Jeff Boes
Philippe Lang wrote: Hi, Since it is not possible to use CREATE OR REPLACE TYPE, is there a way of using DROP TYPE on a non-existing type, without causing the entire script to abort? It may sound crazy to ask for this, but it could be really useful in my case, where Pl/Pgsql and Pl/Perl code is bei

Re: [SQL] 9.17.5. Row-wise Comparison

2005-04-07 Thread Ragnar Hafstað
On Thu, 2005-04-07 at 06:44 -0700, TJ O'Donnell wrote: > it might break in future. > > >if (b > 1) then true > >else if (b = 1 and c > 2) then true > >else if (b = 1 and c = 2 and d > 3) then true > >else false > Your spec sql snippet is like an OR, isn't it, instead > of an AN

Re: [SQL] 9.17.5. Row-wise Comparison

2005-04-07 Thread TJ O'Donnell
I believe I started the multi-column index thread a few months back, but now that I have it working so well, I'm a bit nervous it might break in future. >if (b > 1) then true >else if (b = 1 and c > 2) then true >else if (b = 1 and c = 2 and d > 3) then true >else false Your spec sq

Re: [SQL] DROP TYPE without error?

2005-04-07 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Mischa <[EMAIL PROTECTED]> writes: > I've got a similar request for other objects that do/do not exist. > Maybe it's just that I got lazy using MSSQL, but it sure was convenient > to have: >IF object_id('WorkTable') IS NULL >CREATE TABLE WorkTable(... >

Re: [SQL] Table PARTITION

2005-04-07 Thread Richard Huxton
Sean Davis wrote: This is a totally selfish question, but IF someone has a few minutes, could he/she explain why table partitioning is such an important tool? Say you have a large log-table, you could partition it by month. If most queries only search the last month or two, a lot of your partitio

Re: [SQL] Table PARTITION

2005-04-07 Thread Richard Huxton
Dinesh Pandey wrote: Hi Richard, I am using postgres 8.0.1. It allows us to create TABLESPACE but I don't know how to create PARTITION in postgres. Can you pls tell me little more. You can't I'm afraid. You can use inheritance / a view unioning tables to do something similar though. Check the m

Re: [SQL] TIMESTAMP / summertime

2005-04-07 Thread Christoph Haller
T E Schmitz wrote: > > Hello, > > I *detest* British summertime. This year it took me two days to adjust. > Now I am realizing that my program might need some adjusting too: > > Joking aside, I need some advice regarding TIMESTAMP colums and I can't > quite get my head round this at the moment:

Re: [SQL] Table PARTITION

2005-04-07 Thread Sean Davis
This is a totally selfish question, but IF someone has a few minutes, could he/she explain why table partitioning is such an important tool? Thanks, Sean On Apr 7, 2005, at 8:06 AM, Richard Huxton wrote: Dinesh Pandey wrote: How can we create oracle's table with partition in Postgres. (How to cr

Re: [SQL] Table PARTITION

2005-04-07 Thread Dinesh Pandey
Hi Richard, I am using postgres 8.0.1. It allows us to create TABLESPACE but I don't know how to create PARTITION in postgres. Can you pls tell me little more. Thanks Dinesh Pandey -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 5:36 P

Re: [SQL] Table PARTITION

2005-04-07 Thread Richard Huxton
Dinesh Pandey wrote: How can we create oracle's table with partition in Postgres. (How to create Table partion in postgres) CREATE TABLE invoices (invoice_noNUMBER NOT NULL, invoice_date DATE NOT NULL, comments VARCHAR2(500)) PARTITION BY RANGE (invoice_date) (PARTITION invoices_q1

[SQL] Table PARTITION

2005-04-07 Thread Dinesh Pandey
Title: Table PARTITION How can we create oracle's table with partition in Postgres. (How to create Table partion in postgres) CREATE TABLE invoices (invoice_no    NUMBER NOT NULL,  invoice_date  DATE   NOT NULL,  comments  VARCHAR2(500)) PARTITION BY RANGE (invoice_date) (PARTIT

Re: [despammed] [SQL] Crosstab function

2005-04-07 Thread Markus Schaber
Hi, Bandeng, bandeng schrieb: > I have install postgresql-contrib finally... i'm newbie in server. > I use freebsd 4.8, I saw in documentation it is said use tablefunc.sql > but in freebsd i found file tablefunc.so , it is already compiled. is > there suggestion to install tablefunc.so ? I think

Re: [despammed] [SQL] Crosstab function

2005-04-07 Thread bandeng
I have install postgresql-contrib finally... i'm newbie in server. I use freebsd 4.8, I saw in documentation it is said use tablefunc.sql but in freebsd i found file tablefunc.so , it is already compiled. is there suggestion to install tablefunc.so ? Thank you Ricky On Apr 6, 2005 3:32 PM, Andrea

Re: [SQL] Query Problem

2005-04-07 Thread Richard Huxton
Abdul Wahab Dahalan wrote: If I've 2 tables like this: Country table : with 2 fields (country and id) Country id EnglandE France F JapanJ FlightTo table : with 2 fields(Flight ID and Destination) FlightIDDestination B1

[SQL] Query Problem

2005-04-07 Thread Abdul Wahab Dahalan
If I've 2 tables like this: Country table : with 2 fields (country and id) Country id EnglandE France F JapanJ FlightTo table : with 2 fields(Flight ID and Destination) FlightIDDestination B1 E,J B2