From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: array support patch phase 1 patch |
Date: | 2003-06-01 16:04:36 |
Message-ID: | 3EDA2414.8090707@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane wrote:
> That is surely not what you intended. The test must be whether arg1 and
> arg2 are (separately) coercible to the operator's two input types.
> Moreover, the test must not be symmetric, any more than
> IsBinaryCoercible is. You can coerce int[] to ANYARRAY but not vice
> versa.
>
> A bigger problem is that I doubt this will actually work. Most of the
> places that call compatible_oper will then proceed to call the function
> from specialized code that does not bother with consing up an expression
> tree --- so a polymorphic function is going to fail anyway...
>
How's this attempt?
Couple of issues it raised:
1.) In conjunction with the phase2 patch, which changes array_eq to do
an element-by-element equality comparison, I discovered that type
"aclitem" has no equality operator, and apparently nothing
binary-coercible either. Should I invent "=" for aclitem, or have
array_eq fall back to its original byte-by-byte comparison if it doesn't
find an equality operator?
2.) I noticed that if I start the postmaster without redirecting to a
logfile, I see double error messages in psql. Is this intended? Maybe
due to some conf setting?
[postgres(at)dev postgres]$ pg_ctl start
LOG: database system was shut down at 2003-06-01 08:58:18 PDT
IN: StartupXLOG (xlog.c:2510)
LOG: checkpoint record is at 0/5BCDA4
IN: StartupXLOG (xlog.c:2538)
LOG: redo record is at 0/5BCDA4; undo record is at 0/0; shutdown TRUE
IN: StartupXLOG (xlog.c:2558)
LOG: next transaction id: 475; next oid: 17079
IN: StartupXLOG (xlog.c:2562)
postmaster successfully started
[postgres(at)dev postgres]$ LOG: database system is ready
IN: StartupXLOG (xlog.c:2819)
[postgres(at)dev postgres]$ psql template1
Welcome to psql 7.4devel, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
template1=# select distinct array(select f1 from tse);
ERROR: Unable to identify an ordering operator for type integer[]
Use an explicit ordering operator or modify the query
IN: ordering_oper (parse_oper.c:202)
ERROR: Unable to identify an ordering operator for type integer[]
Use an explicit ordering operator or modify the query
Joe
Attachment | Content-Type | Size |
---|---|---|
array-polycoerce.2.patch | text/plain | 2.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-06-01 16:08:05 | Re: array support patch phase 1 patch |
Previous Message | Tom Lane | 2003-06-01 16:03:08 | Table-driven SHOW (was Re: Are we losing momentum?) |