Your message dated Sat, 19 Mar 2016 16:12:15 +0100
with message-id <[email protected]>
and subject line Re: Bug#596278: postgresql-8.4: Please support subselects in
"using" clause of "alter column" changing type
has caused the Debian Bug report #596278,
regarding postgresql-8.4: Please support subselects in "using" clause of "alter
column" changing type
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
596278: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=596278
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: postgresql-8.4
Version: 8.4.4-1~bpo50+1
Severity: wishlist
In rewriting a large database table, we wanted to make a single pass
over the table, changing a "targeturi" column to reference another
table's primary key instead. We initially tried this:
alter table links alter column targeturi type integer using (select pageid from
pages where uri = targeturi);
However, this produced "ERROR: cannot use subquery in transform
expression".
The postgresql documentation does not seem to specify the syntax of
"using" very clearly (it just says using takes an "expression"). In any
case, "using (select primarykey from othertable where somecolumn =
oldcolumnvalue)" seems like a common use case when altering a column to
reference another table. Please consider supporting this
syntax/functionality.
Thanks,
Josh Triplett and Jamey Sharp
-- System Information:
Debian Release: 5.0.6
APT prefers stable
APT policy: (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.34.1-rscloud (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages postgresql-8.4 depends on:
ii libc6 2.7-18lenny4 GNU C Library: Shared libraries
ii libcomerr2 1.41.3-1 common error description library
ii libkrb53 1.6.dfsg.4~beta1-5lenny4 MIT Kerberos runtime libraries
ii libldap-2.4-2 2.4.11-1+lenny2 OpenLDAP libraries
ii libpam0g 1.0.1-5+lenny1 Pluggable Authentication Modules l
ii libpq5 8.4.4-1~bpo50+1 PostgreSQL C client library
ii libssl0.9.8 0.9.8g-15+lenny8 SSL shared libraries
ii libxml2 2.6.32.dfsg-5+lenny1 GNOME XML library
ii locales 2.7-18lenny4 GNU C Library: National Language (
ii postgresql-clie 8.4.4-1~bpo50+1 front-end programs for PostgreSQL
ii postgresql-comm 105~bpo50+1 PostgreSQL database-cluster manage
ii ssl-cert 1.0.23 simple debconf wrapper for OpenSSL
ii tzdata 2010j-0lenny1 time zone and daylight-saving time
postgresql-8.4 recommends no packages.
Versions of packages postgresql-8.4 suggests:
pn oidentd | ident-server <none> (no description available)
-- no debconf information
--- End Message ---
--- Begin Message ---
Re: Josh Triplett 2010-09-09 <20100909215448.1524.23131.reportbug@serialist>
> Package: postgresql-8.4
> Version: 8.4.4-1~bpo50+1
> Severity: wishlist
>
> In rewriting a large database table, we wanted to make a single pass
> over the table, changing a "targeturi" column to reference another
> table's primary key instead. We initially tried this:
>
> alter table links alter column targeturi type integer using (select pageid
> from pages where uri = targeturi);
>
> However, this produced "ERROR: cannot use subquery in transform
> expression".
>
> The postgresql documentation does not seem to specify the syntax of
> "using" very clearly (it just says using takes an "expression"). In any
> case, "using (select primarykey from othertable where somecolumn =
> oldcolumnvalue)" seems like a common use case when altering a column to
> reference another table. Please consider supporting this
> syntax/functionality.
>
> Thanks,
> Josh Triplett and Jamey Sharp
Hi,
unfortunately, this is still not possible. However, it doesn't help
keeping this feature request open indefinitely in the Debian BTS -
please bring this up on pgsql-hackers, ideally including a patch :).
Closing the bug,
Christoph
--- End Message ---
_______________________________________________
Pkg-postgresql-public mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-postgresql-public