I know that if I create a table salary that references my employee table
works! But I'm trying to work with the composite type concept!
Thinking in Object-Oriented Programming (OOP) I have a class employee that
is composed by the class salary among other things! Like:
Class salary {
private
Hi, I need to create a table like:
CREATE TYPE t_salary
AS (
Value numeric(10,2),
Validity date
);
CREATE TABLE
employee (
id int,
name varchar(30),
salary t_salary[]
);
That is, I need an array of composite type and searching
on goog
10
Para: [EMAIL PROTECTED]
Cc: pgsql-sql@postgresql.org
Assunto: Re: [SQL] Inserting data in composite types!
I am able to do this thing with the following query:
insert into employee (a, name, s) values(1, 'emp name', ((1,
'(01/01/2000, 01/01/2000)')));
--Imad
www.Enterprise
Hi, I have a question about how to insert data
in composite types!
Imagine the exemple:
CREATE TYPE t_time AS
(
a date,
b date
);
CREATE TABLE salary
(
salary
numeric(10,2),
t_date
t_time
);
I know that if I want to insert data in the table
SALARY I just
Hi all,
I need to get all sequences and their respective
current values! Is there any catalog table or any other away to get this???
Thanks in advance.
How can I get all attributes that is not null
+ don’t have defaults + is not PKs??? I know I have to use system
catalog, but I have some Pks that is multicolumn!
Any help??
Rodrigo Sakai
Administrador de Banco de Dados
É(11) 3750-7075
* [EMAIL PROTECTED]
Thanks Mantzios, your answer helped a lot! But I have a lot of multi column
foreign keys! Any other ideia??
Thanks in advance!
-Mensagem original-
De: Achilleus Mantzios [mailto:[EMAIL PROTECTED]
Enviada em: quarta-feira, 28 de junho de 2006 04:01
Para: Rodrigo Sakai
Assunto: Re
Hi,
I want to use the system catalog tables/views
to query some things, and one of the queries I have to do is joining
pg_attribute and pg_constraint to know what constraint belongs to which
table.attribute. My question is how can I write the join clause between a int (pg_attribute.
\'N\'
where codigo=NEW.codigo;
RETURN NULL;
end if;
end;
' LANGUAGE 'plpgsql' VOLATILE;
CREATE TRIGGER tr_sp_teste_trigger
BEFORE INSERT OR UPDATE
ON public.teste_trigger
FOR EACH ROW
EXECUTE PROCEDURE public.sp_teste_loop();
Thank for any hel
our codes. I insist in my question, is there a way to compile the
plpgsql codes or something like that, or its better to think about writting this
postgres functions in C??
Thanks for all!!!
=====
Rodrigo Sakai
Database Programmer
[EMAIL PROTECTED]
http://www.2bfree.com.br
Te
to do that, or the only way is writting my functions in C??
Thanks for any help and regards to all!!!
=
Rodrigo Sakai
Database Programmer
[EMAIL PROTECTED]
http://www.2bfree.com.br
Tel: (55) (11) 5083-5577
Fax: (55) (11) 5549
question is, why is it storing some exponential numbers
(rows number 2 and 4) instead of a string if you look in the
definition of the table above, the column 'num_contr' is a varchar(50)!
So, what is happening?
Thanks for any help!!!
=
Rodrigo Sakai
Analist
12 matches
Mail list logo