Is it possible to have comment lines inside PLPGSQL??
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing li
Is there anywhere I can get these in binary?
Or is my only option to compile Postgres from source??
> Larry Rosenman wrote:
>> --On Friday, January 31, 2003 01:34:42 -0800 David Durst
>> <[EMAIL PROTECTED]> wrote:
>>> Does there exsist a MD5 Function I can call???
&
Does there exsist a MD5 Function I can call???
If not, is there any interest in one?
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
is there a example on how to pass user defined types into
a function??
What I am looking for is something of this nature.
CREATE TYPE dumby_type AS (dumby_id int4, dumby_name text);
create function kick_dumby(dumby dumby_type) returns INTEGER AS '
DECLARE
somenumber integer;
BEGIN
return 1;
> "David Durst" <[EMAIL PROTECTED]> writes:
>> insert into journal_lines
>> (entry_id,account_id,line_type,line_amount)
>> values (eid,aid,ltype,amount);
>> select into line * from journal_lines where entry_id = eid AND
>> account_id = aid
I have a function that is to create a Accounting JOURNAL entry.
The strange thing is the function works for simple entries such as:
Cash - Debit 100
A/R - Credit 100
But when I try to trick it or break it for testing purposes (IT DOES BREAK
WHEN IT SHOULDN'T) on a entry like this:
Cash - Debit
I figured out the issue, DH stupid mistake
select entry_id, entry_description from
lookup_journal_entries(to_date('20030125','MMDD'),
to_date('20030125','MMDD'));
> I recieve this error when executing the following function:
>
> select lookup_journal_entries(to_
I recieve this error when executing the following function:
select lookup_journal_entries(to_date('20030125','MMDD'),
to_date('20030125','MMDD'));
Here is the function itself:
create function lookup_journal_entries(date,date) returns setof journal as '
selec
> David,
>
>> Are there functions for adding and subtracting this type from itself?
>> Or is there a simple way to do it?
>
> The MONEY type is depreciated, and should have been removed from the
> Postgres source but was missed as an oversight. Use NUMERIC instead.
>
> --
> -Josh Berkus
> Aglio
Are there functions for adding and subtracting this type from itself?
Or is there a simple way to do it?
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
here is a possible NON-Cron solution that a friend of mine came up w/
1) Create a table w/ scheduled events and Account Ids attached to them.
2) Create a table w/ temporal event execution timestamps.
3) On journal entry check to see if there any schedule events for the Account
4) Check timestamp t
> On Thu, 23 Jan 2003, David Durst wrote:
>
>> Is there anyway to schedule DB Events based on time?
>
> Yes! cron
>
>> So lets say I had a table w/ depreciation schedules in it,
>> I would like the DB to apply the formula and make the entries on the
>> EN
On a side note, if the DB doesn't support this capability.
Does anyone see a HORRIBLE issue w/ creating a C func
something of this nature.
int handle_temporal_events() {
if(fork == 0) {
//In here we monitor what time it is
//And maintain a Datastructure w/ events
//And update it eve
Is there anyway to schedule DB Events based on time?
So lets say I had a table w/ depreciation schedules in it,
I would like the DB to apply the formula and make the entries on the END
of every month.
---(end of broadcast)---
TIP 3: if posting/read
Can anyone tell me why postgres is creating a implicit index when
I already have a PKEY specified
Or am I just interpreting this all wrong?
Here is the entry I am putting in:
create sequence journal_line_id_seq increment 1 start 1;
create table journal_lines (
journal_line_id int4 PRIMARY
I have a function that I want to return setof a table in plpgsql.
Here is what I have:
CREATE FUNCTION lookup_account(varchar(32)) RETURNS SETOF accounts AS '
DECLARE
aname ALIAS FOR $1;
rec RECORD;
BEGIN
select into rec * from accounts where accountname = aname;
return rec;
END;'
LANGUAG
I want to create a function that will return
a row or rows of a table is this possible?
If so can someone replay with a complete example?
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unre
I was wondering if there was a way of returning a complete row from a
function, in reading the documentation of CREATE FUNCTION. I was under the
impression that you could return a row by using setof, but this does not
seem to be true.
Can anyone help?
---(end of broadcas
t:
ERROR: function declared to return integer, but final statement is not a
SELECT
I thought that a insert would return a internal row #, but I am not sure
about this.
Thanks,
David Durst
MIS Manager
www.la-rubber.com
---(end of broadcast)---
TIP 4:
19 matches
Mail list logo