On Wed, Jan 25, 2012 at 9:54 AM, panam wrote:
> What do you mean with "explicit sequence object"? An own sequence for each
> table per schema?
This:
On Wed, Jan 25, 2012 at 10:23 AM, Merlin Moncure wrote:
> Barring domains, you can just manually apply the default instead of
> using a serial typ
On 25 January 2012 05:41, Pavel Stehule wrote:
> Hello
>
> 2012/1/25 raf :
>> hi,
>>
>> i just needed to round some numbers down to 4 decimal places but a quick
>> search
>> indicated that postgresql doesn't support all of the rounding methods so i
>> had
>> to write this dreadful function:
Are
Hello
2012/1/25 raf :
> hi,
>
> i just needed to round some numbers down to 4 decimal places but a quick
> search
> indicated that postgresql doesn't support all of the rounding methods so i had
> to write this dreadful function:
>
> create or replace function round_down_to_4_decimal_places(amoun
On 01/24/2012 04:23 PM, Merlin Moncure wrote:
> On Tue, Jan 24, 2012 at 5:23 AM, panam wrote:
>> Wow, this is pretty useful. Just to fit it more to my original use case, I
>> used this:
>>
>> CREATE schema schema1;
>> CREATE schema schema2;
>> CREATE TABLE tbl (ID serial primary key,foo varchar,
hi,
i just needed to round some numbers down to 4 decimal places but a quick search
indicated that postgresql doesn't support all of the rounding methods so i had
to write this dreadful function:
create or replace function round_down_to_4_decimal_places(amount decimal(12,6))
returns decimal(10,4)
On Tue, Jan 24, 2012 at 5:23 AM, panam wrote:
> Wow, this is pretty useful. Just to fit it more to my original use case, I
> used this:
>
> CREATE schema schema1;
> CREATE schema schema2;
> CREATE TABLE tbl (ID serial primary key,foo varchar,bar varchar); --in
> public schema
> CREATE TABLE schem
Chris Angelico wrote
>
> I would recommend using an explicit sequence object rather than
> relying on odd behavior like this; for instance, if you now drop
> public.tbl, the sequence will be dropped too. However, what you have
> there is going to be pretty close to the same result anyway.
>
Oops
I'm looking at a database design for tracking the movement/routing of
documents through a workflow using PostgreSQL (version 9.1).
Basically, I have a state diagram for the possible routings and came
up with two different designs for how to implement the tables. As a
quick advance note, n
On Monday, January 23, 2012 10:11:00 pm Sim Zacks wrote:
> On 01/23/2012 07:10 PM, Adrian Klaver wrote:
> > On Monday, January 23, 2012 7:32:35 am Sim Zacks wrote:
> >> On 01/23/2012 05:13 PM, Adrian Klaver wrote:
> >>
> >>
> >> When I throw in code to make the select only return the correct rows
On Tue, Jan 24, 2012 at 10:23 PM, panam wrote:
> Wow, this is pretty useful. Just to fit it more to my original use case, I
> used this:
>
> CREATE TABLE tbl (ID serial primary key,foo varchar,bar varchar); --in
> public schema
> CREATE TABLE schema1.tbl (LIKE public.tbl INCLUDING ALL); --draws
Sim Zacks writes:
> I've seen written that a b-tree index can't be used on a join with an
> OR.
That's not the case ...
> Is there a way to optimize a join so that it can use an index for a
> query such as:
> select
> a.partid,a.duedate,coalesce(a.quantity,0)+sum(coalesce(b.quantity,0))
> from
What version of PostgreSQL?
On Jan 24, 2012, at 9:28, Sim Zacks wrote:
> I've seen written that a b-tree index can't be used on a join with an
> OR. Is there a way to optimize a join so that it can use an index for a
> query such as:
>
> select
> a.partid,a.duedate,coalesce(a.quantity,0)+sum(co
On Mon, Jan 23, 2012 at 8:02 PM, Alan Hodgson wrote:
> On Monday, January 23, 2012 07:54:16 PM Andrew Hannon wrote:
>> It is worth noting that, the slave (seemingly) catches up eventually,
>> recovering later log files with streaming replication current. Can I trust
>> this state?
>>
>
> Should be
On Tue, Jan 24, 2012 at 12:41:28PM +0100, pasman pasmański wrote:
> Hi.
>
> I have a table with two columns:
>
> create table "GroupsOfOrders" (
> "Orders" text[]; -- a set of identifiers
> "Period" cube; -- a period of time for all identifiers in field "Orders"
> );
>
> How to create exclu
pasman pasmański wrote:
> Hi.
>
> I have a table with two columns:
>
> create table "GroupsOfOrders" (
> "Orders" text[]; -- a set of identifiers
> "Period" cube; -- a period of time for all identifiers in field "Orders"
> );
>
> How to create excluding constraint, which prevent overlappi
I've seen written that a b-tree index can't be used on a join with an
OR. Is there a way to optimize a join so that it can use an index for a
query such as:
select
a.partid,a.duedate,coalesce(a.quantity,0)+sum(coalesce(b.quantity,0))
from stat_allocated_components a
left join stat_allocated_compon
Hi.
I have a table with two columns:
create table "GroupsOfOrders" (
"Orders" text[]; -- a set of identifiers
"Period" cube; -- a period of time for all identifiers in field "Orders"
);
How to create excluding constraint, which prevent overlapping "Period"
for all orders in a field "Orders"
Chris Angelico wrote
>
>
> You can "share" a sequence object between several tables. This can
> happen somewhat unexpectedly, as I found out to my surprise a while
> ago:
>
> CREATE TABLE tbl1 (ID serial primary key,foo varchar,bar varchar);
> INSERT INTO tbl1 (foo,bar) VALUES ('asdf','qwer');
On 24 January 2012 09:29, Chris Angelico wrote:
> On Mon, Jan 23, 2012 at 11:17 PM, Douglas Eric wrote:
>> I suggest to change this behavior. If one makes a SELECT statement without
>> any ORDER BY, it would be
>> clever to automatically sort by the first primary key found in the query, if
>> any
* David Johnston:
> Immediately upon starting the server I get an "incomplete startup
> packet" log message. Just prior there is an "autovacuum launcher
> started" message.
Like this?
2012-01-23 10:42:55.245 UTC 11545 LOG: database system is ready to accept
connections
2012-01-23 10:42:55.2
On Mon, Jan 23, 2012 at 11:17 PM, Douglas Eric wrote:
> I suggest to change this behavior. If one makes a SELECT statement without
> any ORDER BY, it would be
> clever to automatically sort by the first primary key found in the query, if
> any.
> The present behavior would still be used in case of
21 matches
Mail list logo