| From: | Ingrith Andrea Correa Vargas <i-correa(at)uniandes(dot)edu(dot)co> |
|---|---|
| To: | pgsql-sql(at)postgreSQL(dot)org |
| Subject: | [SQL] CREATE TABLE (fwd ): again! |
| Date: | 1999-03-05 20:07:51 |
| Message-ID: | Pine.GSO.3.96.990305150731.7678D-100000@isis |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
---------- Forwarded message ----------
Date: Fri, 5 Mar 1999 15:06:28 -0500 (GMT+5)
From: Ingrith Andrea Correa Vargas <i-correa(at)uniandes(dot)edu(dot)co>
Subject: [SQL] CREATE TABLE (fwd ): again!
Hello all!
I beleive that somebody knows how to answer my question...please!!
Make me a favor, please: Im going to send to you what I did, can you see
that and tell me what could be bad?!.
The example 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.
Can you help me?!...
Thank you in advance.
// Ingrith :)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gene Selkov Jr. | 1999-03-05 21:15:37 | Re: [SQL] CREATE TABLE (fwd ): again! |
| Previous Message | Emils Klotins | 1999-03-05 18:01:15 | Re: [SQL] rules |