What I need is to join 2 tables
CREATE TABLE master(
id INT4
);
CREATE TABLE slave (
master_id INT4,
rank INT4,
value TEXT);
What I need is to make the query:
SELECT m.id, array_agg(s.value) AS my_problematic_array
FROM master AS m LEFT JOIN slave AS s ON (m.id = s.master_id)
Mario Splivalo wrote on 14.09.2009 16:20:
Have you considered refactoring so there's only one table?
Unfortunately I can't do that, due to the
object-relational-mapper-wrapper-mambo-jumbo.
You could still refactor that into one single table, then create two updateable
views with the names th
Tom Lane wrote:
> Mario Splivalo writes:
>> I have two tables, tableA and tableB:
>> CREATE TABLE tableA (idA integer primary key, email character varying
>> unique);
>> CREATE TABLE tableB (idB integer primary key, email character varying
>> unique);
>
>> Now, I want to create check constraint i
Mario Splivalo writes:
> I have two tables, tableA and tableB:
> CREATE TABLE tableA (idA integer primary key, email character varying
> unique);
> CREATE TABLE tableB (idB integer primary key, email character varying
> unique);
> Now, I want to create check constraint in both tables that would
>
How would you do it, without creating third table?
Mario
Ries van Twisk wrote:
> can't you solve it creating a reference between the tables?
>
> Ries
> On Sep 14, 2009, at 8:24 AM, Mario Splivalo wrote:
>
>> I have two tables, tableA and tableB:
>>
>> CREATE TABLE tableA (idA integer pr
can't you solve it creating a reference between the tables?
Ries
On Sep 14, 2009, at 8:24 AM, Mario Splivalo wrote:
I have two tables, tableA and tableB:
CREATE TABLE tableA (idA integer primary key, email character varying
unique);
CREATE TABLE tableB (idB integer primary key, email character
I have two tables, tableA and tableB:
CREATE TABLE tableA (idA integer primary key, email character varying
unique);
CREATE TABLE tableB (idB integer primary key, email character varying
unique);
Now, I want to create check constraint in both tables that would
disallow records to either table whe