Received: from isis.uniandes.edu.co (isis.uniandes.edu.co [157.253.54.5]) by hub.org (8.9.2/8.9.1) with ESMTP id QAA82666 for ; Sat, 27 Feb 1999 16:35:23 -0500 (EST) (envelope-from i-correa@uniandes.edu.co) Received: from isis (isis [157.253.54.5]) by isis.uniandes.edu.co (8.9.3/8.9.3) with SMTP id QAA10182 for ; Sat, 27 Feb 1999 16:35:24 -0500 (GMT+5) Date: Sat, 27 Feb 1999 16:35:23 -0500 (GMT+5) From: Ingrith Andrea Correa Vargas X-Sender: i-correa@isis Reply-To: Ingrith Andrea Correa Vargas To: pgsql-sql@postgreSQL.org Subject: CREATE TABLE - DEFAULT Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hello again! I have been receiving some mails asking my question about creating a table with a default value as a user defined function, but I have a problem yet. I hope somebody knows to solve my problem... Thank you in advance! :) //Ingrith ---||--- Te complete problem is: --------------------------------------------------------- CREATE TABLE emp (code INT4 , name VARCHAR(20) , salary INT4 , 2salary INT4 default double_salary(emp) ); CREATE FUNCTION double_salary(emp) RETURNS INT4 AS 'SELECT $1.salay * 2 AS result' LANGUAGE 'sql' ; ERROR: parser: syntax error at or near ")" --------------------------------------------------------- Function double_salary receives an 'emp' , as you see, and there is the error, because if I change parameter 'emp' by a number, the error doesn't appear. How can I do?! The origin of this question is that I want to know if a subclass inherits all atributtes from the parent, included functions like double_salary in my example.