[GENERAL] Inheritance foreign key unexpected behaviour

2007-10-20 Thread M. van Egmond
Hi all, Im trying to use table inheritance in my database. I need it because i want to be able to link any object in the database to another. So i created a table my_object which has a serial, nothing more. All the other tables in the system are inherited from this my_object table. Im having diffi

Re: [GENERAL] Type cast text to int4

2007-09-07 Thread M. van Egmond
Could you please give me the correct syntax to create a basetype using pl/pgsql functions instead of external functions? Or is this impossible? Thanks. Martijn van Oosterhout schreef: On Fri, Sep 07, 2007 at 11:36:23AM +0200, M. van Egmond wrote: Hello everybody, Im having troubles

[GENERAL] Type cast text to int4

2007-09-07 Thread M. van Egmond
Hello everybody, Im having troubles overriding postgresql's default behaviour of throwing an error while trying to cast an empty string to int4. I would like to cast empty strings to a null integer value. I've tried this by creating my own domain: CREATE DOMAIN my_int AS integer; -- Then create

[GENERAL] Type cast text to int4

2007-09-07 Thread M. van Egmond
Hello everybody, Im having troubles overriding postgresql's default behaviour of throwing an error while trying to cast an empty string to int4. I would like to cast empty strings to a null integer value. I've tried this by creating my own domain: CREATE DOMAIN my_int AS integer; -- Then cr