Skip site navigation (1) Skip section navigation (2)

V3 protocol; way to return table aliases?

From: Ken Johanson <pg-user(at)kensystem(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: V3 protocol; way to return table aliases?
Date: 2007-01-30 06:53:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hi all,

I think I've heard the answer to this in another list, but I just want
to get the widest audience and set of opinions, to be sure..

Apparently right now the V3 protocol doesn't return table-aliases for
columns, like:

select employee.firstName, boss.firstName from contacts as employee,
contacts as boss where AND boss.role = .. AND
employee.role = ...

where on the client we could build a metadata descriptor for each
column, and the table alias for column 1 would return 'employee' and 2
would be 'boss'. (perhaps it should be a separate discussion as to which
the real table name or alias should be returned, if not both - as this
depends on the API/spec)

My question is, is it in *any way* possible to add extra data to V3
without breaking existing clients... so that we can stuff the column
alias into the response.. Or does this really, really need V4?

Since I've been told V3 is prob. not doable, this question certainly
seems to match the 'Hackers' challenge/namesake :)

Thanks in advance,

pgsql-hackers by date

Next:From: Pavan DeolaseeDate: 2007-01-30 10:17:59
Subject: stack usage in toast_insert_or_update()
Previous:From: A. KretschmerDate: 2007-01-30 06:32:11
Subject: Re: SQL to get a table columns comments?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group