W dniu 2012-05-25 10:28, Svenne Krap pisze:
Hi.
I am building a system, where we have jobs that run at different times (and takes widely different
lengths of time).
Basically I have a jobs table:
create table jobs(
id serial,
ready boolean,
job_begun timestamptz,
job_done ti
W dniu 2012-05-25 14:52, Jan Lentfer pisze:
Add a sort of status table where you insert your unique job identifer at the start of the function
and remove it in the end? As seperate transactions of course.
That might leave status set on forever in a case when a job crashes and does not reach th
Lee Hachadoorian pisze:
Is there a function that returns the average of the elements of an
array? I'm thinking of something that would work like the avg()
aggregate function where it returns the average of all non-NULL
values. Can't find anything like it in the docs, and I'd like to make
sure I'm
Jorge Godoy pisze:
Are you sure?
http://en.wikipedia.org/wiki/ISO_8601
snip
As Jan 1st, 2010 happened on a Friday, it was on week 53 of 2009.
you are right, thanks for pointing that out.
I didn't check the opposite way like this:
select date_part('week', '2010-01-01'::date);
date_part
Sergey Konoplev pisze:
CREATE OR REPLACE FUNCTION your_week2date(double precision, double
precision) RETURNS SETOF date
AS
$_$
SELECT day
FROM (
SELECT (
date_trunc('week', ($1::text||'-01-01')::date)
+ ($2::text||' week')::interval
+ ( d::text||' da
Sergey Konoplev pisze:
On 25 March 2010 12:25, Ireneusz Pluta wrote:
Hello,
is there any standard function, or a concise solution based on set of them,
returning a set of dates included in a week of given year and week number?
I ended up with creating my own function as in the example
Hello,
is there any standard function, or a concise solution based on set of
them, returning a set of dates included in a week of given year and
week number?
I ended up with creating my own function as in the example below, but I
am curious if I am not opening an open door.
Thanks
Irek.
C
it's better to use some sort of numeric
or integer and store
amounts of cents, not dollars.
Apparently, new records are not inserted in the table according to the
order selected by "Test_Step_Id" field;
As seen in: http://en.wikipedia.org/wiki/SQL:
"The order of rows returned by an SQL query is never guaranteed unless
an ORDER BY clause is specified".
In other words, a databas
Joshua napisał(a):
I have a column with the following values (example below)
5673
4731
4462
5422
756
3060
I want the column to display the numbers as follows:
56.73
47.31
44.62
54.22
7.56
30.60
I have been playing around with string functions but cannot seem to
figure out a quick solution.
Andreas Kretschmer napisał(a):
Yes, right.
but actually i would need the information from within a (postgres)
sql-query. is there a possibility to get information about the indices
which have been created on a table?
Yes, of corse. Please start psql with the -E - option. Now you can
ivan marchesini napisał(a):
Dear postgres Users,
I have a simple question I think.
I have a table that contains some columns
one of these columns (the columns ID) contains distinct integer
values ...
I need to insert into this table some other records but I only need that
values were inserted int
12 matches
Mail list logo