Dnia 24-05-2005, wto o godzinie 00:06 -0400, Tom Lane napisa(a):
Joe Conway [EMAIL PROTECTED] writes:
Markus Bertheau wrote:
why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of
ARRAY[] resp. '{}'?
Why would you expect an empty array instead of a NULL?
I think he's got
O Joe Conway May 23, 2005 :
Markus Bertheau wrote:
why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of
ARRAY[] resp. '{}'?
Why would you expect an empty array instead of a NULL? NULL is what
you'd get for other data types -- for example:
One could ask in the same
Timo Roessner wrote:
and if i try something like:
alter table fragment alter column x type numeric(15,2)
i get an syntax error, so this seems to be no feature in 7.4.1 (didnt
find anything like that in the docs too)
what can i do to solve this? there must be some way in postgresql
2005/5/20, Andrew Hammond [EMAIL PROTECTED]:
The solution to your problem is locking (or concurrency control if you
prefer). While we're at it, we might as well optimize your statement a
little too using ORDER BY with LIMIT instead of min().
SELECT id INTO _contacto_id
FROM contactos
Dear Gurus,
Sorry for upping a 13-month-old thread; please tell if I should've opened
another one.
Here I come again, with another silly join. Please forgive me, but our
queries are built from blocks :)
VERSION: 7.4.6, 7.4.8, 8.0.0rc4 (sorry, no newer installed right now)
ABSTRACT: The
Rafa Couto wrote:
2005/5/20, Andrew Hammond [EMAIL PROTECTED]:
The solution to your problem is locking (or concurrency control if you
prefer). While we're at it, we might as well optimize your statement a
little too using ORDER BY with LIMIT instead of min().
SELECT id INTO _contacto_id
FROM
Rafa Couto wrote:
I have got a plpgsql function:
-- BEGIN;
SELECT min(id) INTO _contacto_id FROM contactos
WHERE contactos.operadora_id IS NULL AND contactos.actividad_id
= _actividad_id;
UPDATE contactos SET operadora_id = _operadora_id WHERE id = _contacto_id;
--
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Rafa Couto wrote:
I understand FOR UPDATE clause is locking while is selecting rows
only. It does not secure atomic execution from 'SELECT' to 'UPDATE' in
next statement. Is not it?
Locks adhere until the transaction ends. I included links to
PostgreSQL 7.4 ...
I'm trying to find a way to drop a table via SQL if it contains 0 rows. Here
was my thought:
CREATE OR REPLACE FUNCTION dropif(text, bool)
RETURNS bool AS
'DECLARE
tblname ALIAS FOR $1;
condition ALIAS FOR $2;
BEGIN
IF (condition) THEN
EXECUTE(\'DROP TABLE \' ||
On 5/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I am restructuring my DB schema and need help migrating data from 1
column of an existing table to two new tables. I have some Java code
that can do this for me, but it's very slow, and I am now hoping I can
migrate this data with some
This tip was at the end of a message (from Szcs Gbor).
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
it looks very important, but I cannot understand it. Sound as a small
and easy mistake that can make things go
On Tue, 2005-05-24 at 13:26, Alain wrote:
This tip was at the end of a message (from Szcs Gbor).
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
it looks very important, but I cannot understand it. Sound as a small
=?ISO-8859-2?Q?Sz=FBcs_G=E1bor?= [EMAIL PROTECTED] writes:
ABSTRACT: The following query fails.
SELECT * FROM
(SELECT a,b FROM cdqp WHERE a=1 AND b=2) AS aa
NATURAL FULL JOIN
(SELECT a,b FROM cdqp WHERE a=1 and b=2) AS bb
WHERE a+b = 3;
Thanks for the
Hi.
How can I delete the duplicated records with DELETE FROM TABLE WHERE...
clause??
The problem is becouse I have imported data from Dbase (dbf) file, and this
function have not built the Constraint (unique, primary key, ...), and this
function is usually executed.
select * from table1; --id
How can I delete the duplicated records with DELETE FROM TABLE WHERE...
clause??
The problem is becouse I have imported data from Dbase (dbf) file, and
this
function have not built the Constraint (unique, primary key, ...), and
this
function is usually executed.
If you have no primary
am 24.05.2005, um 17:59:31 -0300 mailte [EMAIL PROTECTED] folgendes:
Hi.
How can I delete the duplicated records with DELETE FROM TABLE WHERE...
clause??
Please read http://www.gtsm.com/oscon2003/deletetid.html
Its a very good article about this problem.
Regards, Andreas
--
Andreas
16 matches
Mail list logo