Re: [HACKERS] self defined data type with limit?

2007-06-29 Thread Michael Enke
If you want ORDER BY on the column to default to your custom ordering, the only way is a distinct datatype that you can make your custom opclass be the default for. The domain idea might work, I'm not totally sure. Defining functions/operators on a domain is a bit ticklish because anything but

Re: [HACKERS] self defined data type with limit?

2007-06-28 Thread Michael Enke
Heikki Linnakangas wrote: Michael Enke wrote: My primary goal is to get quasi numeric ordering on text column, e.g. 1 2 10 Normal order with varchar would be 1 10 2 You don't need to custom type for that. A custom operator class with custom comparison operators is enough. Ok, I tried

[HACKERS] self defined data type with limit?

2007-06-27 Thread Michael Enke
Hello everyone, I have created a new data type mychar. How can I specify a limit for it? This (unlimited version) works fine: create table table_a(col_a mychar); This gives an error: create table table_a(col_a mychar(10)); ERROR: syntax error at or near ( bei Zeichen 34 ZEILE 1: create table

Re: [HACKERS] self defined data type with limit?

2007-06-27 Thread Michael Enke
Joshua D. Drake wrote: Martijn van Oosterhout wrote: On Wed, Jun 27, 2007 at 02:08:43PM +0200, Michael Enke wrote: Hello everyone, I have created a new data type mychar. How can I specify a limit for it? This (unlimited version) works fine: create table table_a(col_a mychar); What

Re: [HACKERS] copy table from file: with row replacement?

2007-01-12 Thread Michael Enke
This works for small amount of data. But for large amount of data the join takes a lot of time. Regards, Michael Bruce Momjian wrote: Michael Enke wrote: Hello all, I have a feature request as I think it is not possible with the actual version: I want to load huge amount of data and I know

[HACKERS] copy table from file: with row replacement?

2007-01-11 Thread Michael Enke
Hello all, I have a feature request as I think it is not possible with the actual version: I want to load huge amount of data and I know that COPY is much faster than doing inserts. But in my case I have an already filled table and rows (not all, only partly) from this table should be