On Thursday 17 September 2009 8:35:52 am Nico Mandery wrote:
> Hello list,
>
> I am trying to wirte a rule which calls a PLPgSQL-function upon an
> Insert in a table. Here is a somewhat simplified example of what i got
> so far:
>
> CREATE TABLE mytable (
> mytable_id serial PRIMARY KEY,
>
Tom Lane wrote:
> rawi writes:
>> Grails/Hibernate wishes per default one sequence for all tables-PKs and all
>> PKs as BigInt.
>
> Redesign that software; this is fundamentally broken and stupid.
It's a pretty silly default, but it's clearly intended for simple /
small databases. In any real da
Gavin McCullagh wrote:
On Thu, 17 Sep 2009, Frank Bax wrote:
Gavin McCullagh wrote:
SELECT time, to_timestamp(time) AS ts,
EXTRACT('months',to_timestamp(time)) FROM mdl_log;
ERROR: syntax error at or near ","
LINE 1: ...t time, to_timestamp(time) AS ts, extract('months',to_times...
Try repl
On Thu, 17 Sep 2009, Osvaldo Kussama wrote:
> From manual:
> http://www.postgresql.org/docs/current/interactive/functions-datetime.html
>
> date_part('month',to_timestamp(time))
> or
> extract(month from to_timestamp(time))
Gah. I don't know I missed that. This works fine.
SELECT extract(mo
On Thu, 17 Sep 2009, Gavin McCullagh wrote:
> On Thu, 17 Sep 2009, Frank Bax wrote:
>
> > Gavin McCullagh wrote:
> >> SELECT time, to_timestamp(time) AS ts,
> >> EXTRACT('months',to_timestamp(time)) FROM mdl_log;
> >> ERROR: syntax error at or near ","
> >> LINE 1: ...t time, to_timestamp(time)
2009/9/17 Gavin McCullagh :
> On Thu, 17 Sep 2009, Frank Bax wrote:
>
>> Gavin McCullagh wrote:
>>> SELECT time, to_timestamp(time) AS ts,
>>> EXTRACT('months',to_timestamp(time)) FROM mdl_log;
>>> ERROR: syntax error at or near ","
>>> LINE 1: ...t time, to_timestamp(time) AS ts, extract('months'
On Thu, 17 Sep 2009, Frank Bax wrote:
> Gavin McCullagh wrote:
>> SELECT time, to_timestamp(time) AS ts,
>> EXTRACT('months',to_timestamp(time)) FROM mdl_log;
>> ERROR: syntax error at or near ","
>> LINE 1: ...t time, to_timestamp(time) AS ts, extract('months',to_times...
>
> Try replacing extr
Gavin McCullagh wrote:
SELECT time, to_timestamp(time) AS ts, EXTRACT('months',to_timestamp(time))
FROM mdl_log;
ERROR: syntax error at or near ","
LINE 1: ...t time, to_timestamp(time) AS ts, extract('months',to_times...
Try replacing extract('month',value) with extract('months' from value
Hi folks,
I have a db that I need to draw some stats from. The db itself is from the
web application moodle which, perhaps to be cross-platform, uses unix epoch
times stored as integers throughout (see table description at end of mail).
I'd like to query some stats based on the appearance of obje
Hello list,
I am trying to wirte a rule which calls a PLPgSQL-function upon an
Insert in a table. Here is a somewhat simplified example of what i got
so far:
CREATE TABLE mytable (
mytable_id serial PRIMARY KEY,
something text
);
CREATE OR REPLACE FUNCTION _rule_insert_my(someth
rawi wrote:
>
> Leo Mannhart wrote:
>> Caveat: If you use the standard sequence generator in hibernate, it is
>> not using the postgres-sequence in the "usual" manner. hibernate itself
>> caches 50 ID's as sequence numbers by default. This means, hibernate
>> only does a select on the database seq
Above all, do not fret about whether or not it is "cool to lose" some
ids. There are plenty of integers; the ids need not be consecutive. I
don't think Grails requires a single sequence source and I know
hibernate does not. Hibernate will allow one to inject any sequence/id
generator you wis
Tom Lane-2 wrote:
>
>> Grails/Hibernate wishes per default one sequence for all tables-PKs and
>> all
>> PKs as BigInt.
>
> Redesign that software; this is fundamentally broken and stupid.
>
Hi Tom, its me again...
I only need to further understand...
What for a source did have the OIDs in
Leo Mannhart wrote:
>
> Caveat: If you use the standard sequence generator in hibernate, it is
> not using the postgres-sequence in the "usual" manner. hibernate itself
> caches 50 ID's as sequence numbers by default. This means, hibernate
> only does a select on the database sequence every 50 n
Tom Lane-2 wrote:
>
>> Grails/Hibernate wishes per default one sequence for all tables-PKs and
>> all
>> PKs as BigInt.
>
> Redesign that software; this is fundamentally broken and stupid.
>
Thank you Tom...
but redesigning Grails and Hibernate is far beyond my possibilities :)
I could work
rawi writes:
> Grails/Hibernate wishes per default one sequence for all tables-PKs and all
> PKs as BigInt.
Redesign that software; this is fundamentally broken and stupid.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes t
rawi wrote:
> Hello!
>
> The subject says it...
>
> Grails/Hibernate wishes per default one sequence for all tables-PKs and all
> PKs as BigInt.
>
> What would you think about a database with some tens of tables and
> incidentally low to moderate insert concurrency spread in about the half of
>
SORRY for incorrectly posting this here!
I couldn't move it to PostgreSQL - performance... afterwards.
While I don't want to double-post: It would be perfect, if the mail list
admin - please - could correct my mistake...
Regards, Rawi
--
View this message in context:
http://www.nabble.com/Hib
Hello!
The subject says it...
Grails/Hibernate wishes per default one sequence for all tables-PKs and all
PKs as BigInt.
What would you think about a database with some tens of tables and
incidentally low to moderate insert concurrency spread in about the half of
the tables from at most 10 conc
19 matches
Mail list logo