predefined animation and pre-recorded sounds in postgresql
Hello,
I
just need to load pre-defined animations and pre-recorded sounds in
postgresql.Can you please tell how to do this.I appreciate your help.
Thank You,
Aravind.
On 08/07/2008 19:44, aravind chandu wrote:
I just need to load pre-defined animations and pre-recorded
sounds in postgresql.Can you please tell how to do this.I appreciate
your help.
You need the bytea data type, which lets you store binary data. How you
get it in and out depends on what interface you're using.
There have been various threads - one earlier today, as it happens - on
the respective merits of storing binary files in the database or in the
filesystem; might be worth your while having a trawl through the archives.
Ray.
------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------
If I have an expression (a or b)a where a=TRUE and b=FALSE, why is b
evaluated? Any true operand before an or operator means the entire
expression is true .
---------------------------- EXAMPLE
create or replace function pinsusers() returns trigger as
$$
declare msg varchar;
begin
--THROWS EXCEPTION when ((TG_OP = 'INSERT') is TRUE "record old
is not assigned yet"
msg = ((TG_OP = 'INSERT') or (new.password<>old.password));
raise exception '%',msg;
return new;
end
$$ language plpgsql;
------------------------------------------------------
TY :-)
MadHatter wrote:
If I have an expression (a or b)a where a=TRUE and b=FALSE, why is b
evaluated? Any true operand before an or operator means the entire
expression is true .
There is no "before" - PG makes no guarantee about evaluation order.
Don't forget a,b might well be subqueries and you don't want to prevent
PG from applying optimisations.
---------------------------- EXAMPLE
create or replace function pinsusers() returns trigger as
$$
declare msg varchar;
begin
--THROWS EXCEPTION when ((TG_OP = 'INSERT') is TRUE "record old
is not assigned yet"msg = ((TG_OP = 'INSERT') or (new.password<>old.password));
You're looking at nested IF .. THEN's I'm afraid. Or using pl/perl or
similar.
--
Richard Huxton
Archonet Ltd