1. POSTGRES DATABASE
http://facebook.com/jacek.fleszar
mailto:Fleszar@hotmail.com
CREATE TABLE "shipments" (
"id" integer NOT NULL,
"customer_id" integer,
"isbn" text,
"ship_date" timestamp with time zone);CREATE TABLE "dzisiaj" (
"id" integer NOT NULL,
"dzien" integer,
"miesiac" text,
"data" timestamp with time zone
);
insert into shipments values (2,
07');
107,
'0394800753','2001-09-22 20:18:56-
select * from shipments
CREATE FUNCTION "add_shipment" (integer,text) RETURNS timestamp with time zone
AS '
DECLARE
customer_id ALIAS FOR $1;
isbn ALIAS FOR $2;
shipment_id INTEGER;
right_now timestamp;
BEGIN
right_now := ''now'';
INSERT INTO shipments VALUES ( 3, customer_id, isbn, right_now );
RETURN right_now;
END;
' LANGUAGE 'plpgsql'
select add_shipment(1,'newItem');
OPERATOR ????
Type
??????