On Sun, Sep 30, 2012 at 06:54:35PM +0200, Levente Kovacs wrote:
> I've been using PostgreSQL for quite while, but I'd need some direction on
> how to handle an opened socket to the database in longer periods.
>
> I open the connection to my database with PQconnectdb().
>
> I access the database,
On Tue, 15 Nov 2011 18:56:37 -0700, J.V. wrote:
I have a table with existing data for which I need to:
1) drop the single primary key column (int4)
2) recreate the column with the pk (not null) constraint deferred
3) repopulate the column from a sequence
4) enable the constraint
When I issue th
ong, though easily modified to add "and table1_id = foo".
> Wouldn't I need to use a UNION for this kind of query?
A union will combine rows (if they're compatible) from two queries,
What you are asking is to assemble columns, which is entirely different.
--
nathan wagner
hat
"a BETWEEN x AND y
is equivalent to
a >= x AND a <= y"
Which is wrong (though it may be required by the standard, of course).
1 is not between 1 and 2. "between" shouldn't include the endpoints.
At any rate, the OP will know what he meant by "betwe
(1 row)
granicus%
but I probably wouldn't do it this way at all. something like
(untested)
select A.name, A.val1 as age, S.val12 as size
from agedata A left outer join sizedata S on S.name = A.name;
should work.
--
Nathan Wagner
[EMAIL PROTECTED]
---