pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Why can't I ......... 3+ messages / 3 participants [nested] [flat]
* Why can't I ......... @ 2001-07-31 07:54 Mounir Benzid <mbenzid@yahoo.de> 2001-08-07 16:34 ` Re: Why can't I ......... Josh Berkus <josh@agliodbs.com> 0 siblings, 1 reply; 3+ messages in thread From: mbenzid@yahoo.de @ 2001-07-31 07:54 UTC (permalink / raw) To: pgsql-sql -- do a join between two databases within the same installation. ... where db1.table1.userid = db2.table2.userid -- use labels to name columns in this way ... select col1 userid, col2 name from ... (instead of using AS) -- do an update with full referenced colomns ... update table1 set table1.col1=value ??? Thank you in advance! mo ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Why can't I ......... 2001-07-31 07:54 Why can't I ......... Mounir Benzid <mbenzid@yahoo.de> @ 2001-08-07 16:34 ` Josh Berkus <josh@agliodbs.com> 2001-08-07 18:29 ` Re: Why can't I ......... Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 3+ messages in thread From: Josh Berkus @ 2001-08-07 16:34 UTC (permalink / raw) To: mbenzid@yahoo.de; pgsql-sql Mounir, > -- do a join between two databases within the same installation. > > ... where db1.table1.userid = db2.table2.userid Because this is not supported on PostgreSQL. There are a number of reasons, and it may never be supported because there are drawbacks to allowing databases to reference each other (mainly security). > -- use labels to name columns in this way > > ... select col1 userid, col2 name from ... (instead of using AS) Because AS is the ANSI SQL 92 standard. And we like standards. > -- do an update with full referenced colomns > > ... update table1 set table1.col1=value Because UPDATES, per the SQL 92 standard, are on one table only. Thus any refenced columns *must* belong to that table, and if so, why name it? -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Why can't I ......... 2001-07-31 07:54 Why can't I ......... Mounir Benzid <mbenzid@yahoo.de> 2001-08-07 16:34 ` Re: Why can't I ......... Josh Berkus <josh@agliodbs.com> @ 2001-08-07 18:29 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2001-08-07 18:29 UTC (permalink / raw) To: Josh Berkus <josh@agliodbs.com>; +Cc: mbenzid@yahoo.de; pgsql-sql "Josh Berkus" <josh@agliodbs.com> writes: >> -- use labels to name columns in this way >> >> ... select col1 userid, col2 name from ... (instead of using AS) > Because AS is the ANSI SQL 92 standard. And we like standards. Actually, SQL92 says that AS is optional. However, Postgres contains a lot of extensions to SQL92, and some of them produce parse ambiguities if AS is optional. So we require it. This isn't going to change, as it would require ripping out a lot of useful stuff. regards, tom lane ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-08-07 18:29 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2001-07-31 07:54 Why can't I ......... Mounir Benzid <mbenzid@yahoo.de> 2001-08-07 16:34 ` Josh Berkus <josh@agliodbs.com> 2001-08-07 18:29 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox