in my app i have a table where the id serves as a foreign key for one or more
other tables. if i want to delete a row in the table, i currently search the
other tables where this table is referenced to see if the row is in use - and
then, if not in use, permit deletion. Now if i want the delete
On Tue, 29 Jun 2004, Stefan Weiss wrote:
> On Tuesday, 29 June 2004 00:17, Dmitri Bichko wrote:
> > As far as TRUE and FALSE go, from what I know you can use = to compare
> > them with boolean columns, unless I misunderstood your question.
>
> Sorry, I must have remembered that incorrectly, or ma
Re,
thanks for all the replies.
On Tuesday, 29 June 2004 00:17, Dmitri Bichko wrote:
> As far as TRUE and FALSE go, from what I know you can use = to compare
> them with boolean columns, unless I misunderstood your question.
Sorry, I must have remembered that incorrectly, or maybe I've been
thin
Think about a join where you do something like:
t1.f1 = t2.f1
If both columns were blank, would you want the join to succeed? Probably not, if you
did, then you
would potentially have a cartesian select. This is not a good explanation of NULL
non-equality, but
I thought it might be useful.
NO
> I'm just curious - why is it not possible to use the "=" operator
> to compare values with NULL? I suspect that the SQL standard
> specified it that way, but I can't see any ambiguity in an
> expression like "AND foo.bar = NULL". Is it because NULL does not
> "equal" any value, and the expression
On June 28, 2004 03:02 pm, Stefan Weiss wrote:
> I'm just curious - why is it not possible to use the "=" operator to
> compare values with NULL? I suspect that the SQL standard specified
> it that way, but I can't see any ambiguity in an expression like "AND
> foo.bar = NULL". Is it because NULL d
You are exactly right - the way I think about it is that if you have two
values which are unknown (a null column and NULL) it does not follow
that they are equal to each other.
As far as TRUE and FALSE go, from what I know you can use = to compare
them with boolean columns, unless I misunderstood
Hi.
I'm just curious - why is it not possible to use the "=" operator to
compare values with NULL? I suspect that the SQL standard specified
it that way, but I can't see any ambiguity in an expression like "AND
foo.bar = NULL". Is it because NULL does not "equal" any value, and the
expression shou
Markus Bertheau <[EMAIL PROTECTED]> writes:
> oocms=# SELECT ARRAY(SELECT 1 WHERE FALSE);
> ?column?
> --
>
This one seems strange to me. Shouldn't it result in an empty array?
--
greg
---(end of broadcast)---
TIP 9: the planner wi
unsubscribe
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
Markus Bertheau wrote:
How do I specify an empty array with the standard syntax?
Actually, up until the 7.4 release, the array literal syntax was the
*only* syntax (i.e. '{...}'). The newer array constructor expression
(i.e. ARRAY[...]) does not yet support creating empty arrays -- there
are som
Markus Bertheau wrote:
How do I specify an empty array with the standard syntax?
Actually, up until the 7.4 release, the array literal syntax was the
*only* syntax (i.e. '{...}'). The newer array constructor expression
(i.e. ARRAY[...]) does not yet support creating empty arrays -- there
are som
Ð ÐÐÐ, 28.06.2004, Ð 18:26, Joe Conway ÐÐÑÐÑ:
> Markus Bertheau wrote:
> > is the empty array representable in PostgreSQL, and is it
> > distinguishable from NULL?
>
> Yes, and yes.
>
> Since NULL array elements are not currently supported, attempting to
> construct an array with a NULL element
you can find more information here: http://www.postgresql.org/docs/7.4/static/sql-createtable.html (under the parameters section). For unique constraints, the only thing I can think of is a table check constraint (SELECT count(pk)=0).
I agree with you, right now there are many inconveniences w
Markus Bertheau wrote:
is the empty array representable in PostgreSQL, and is it
distinguishable from NULL?
Yes, and yes.
regression=# select '{}'::int[];
int4
--
{}
(1 row)
regression=# select NULL::int[];
int4
--
(1 row)
Since NULL array elements are not currently supported, attempting
Hi,
is the empty array representable in PostgreSQL, and is it
distinguishable from NULL?
oocms=# SELECT ARRAY[1, 2];
array
---
{1,2}
(1 ÑÑ)
oocms=# SELECT '{1, 2}'::INT[];
int4
---
{1,2}
(1 ÑÑ)
oocms=# SELECT ARRAY[];
ERROR: syntax error at or near "]" at character 14
ooc
16 matches
Mail list logo