have database with many partitions. each partition table has its own primary
key sequence.
Column || Modifiers
---++--
uno_id|| not null default
Attempting to get a list of items that we want to be grouped by id and date,
with a detail column.
Table a is a typical user table; id, first and last name are all that I am
using
Table b is a tracking table, combining data from 8+ tables into one for ease
of use for reporting purposes; id,
-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org]
On Behalf Of Edward W. Rouse
Sent: Tuesday, January 31, 2012 3:27 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] must appear in the GROUP BY clause or be used in an aggregate
function problem
On Tue, Jan 31, 2012 at 12:27 PM, Edward W. Rouse ero...@comsquared.comwrote:
And in most cases this works fine. The problem arises when invoices get
added to the exception table due to their not being an invoice number. Even
though we join on the tracking id, the group by on invoicenum lumps
chester c young chestercyo...@yahoo.com writes:
have database with many partitions. each partition table has its own primary
key sequence.
Column || Modifiers
---++--
I would love to remove most of the aggregate functions. I am trying to
update an existing query to provide better data and started with the
existing one (which is where the MAX for the names came from). I originally
tried to remove those, but I get the group by/aggregate function error if I
do. I
NM, I figured it out. The mere presence of an aggregate function and/or the
group by clause is what's causing all the hate for me. I will take a whack
at getting this to work without them. Thanks all.
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org]
On Behalf Of
On Tue, Jan 31, 2012 at 1:43 PM, Edward W. Rouse ero...@comsquared.comwrote:
NM, I figured it out. The mere presence of an aggregate function and/or
the group by clause is what’s causing all the hate for me. I will take a
whack at getting this to work without them. Thanks all.
All columns
Yeah, that's what I did. No more group by, the MAX is in a subquery. One of
the reasons I hate coming behind someone else and updating their stuff is
that too many people try to get cute with the code. I try to make everything
as plain and simple as possible unless performance issues require
From: chester c young chestercyo...@yahoo.com
Subject: Re: [SQL] pg_dump not correctly saving schema with partitioned
tables?
To: Tom Lane t...@sss.pgh.pa.us
Date: Tuesday, January 31, 2012, 5:40 PM
--- On Tue, 1/31/12, Tom Lane t...@sss.pgh.pa.us
wrote:
From: Tom Lane
I've noticed when I set a field to char, it takes up lots of space over varchar:
iamunix=# SELECT * FROM music;
id | band| album |date|
asin|label
On Tuesday, January 31, 2012 8:08:06 pm Carlos Mennens wrote:
I've noticed when I set a field to char, it takes up lots of space over
varchar:
iamunix=# SELECT * FROM music;
id | band| album |date|
asin|
chester c young chestercyo...@yahoo.com writes:
here is a test case:
[ slightly less messed-up test case for anyone who wants to duplicate this: ]
create schema s1;
create schema s2;
create table s1.t1(
c1 bigserial primary key,
c2 text );
create table s2.t1(
c1 bigserial
13 matches
Mail list logo