Commit fa4f8776 authored by Bruce Momjian's avatar Bruce Momjian

Remove TODO.detail directory. All URLs now in TODO file as references.

parent 883b6a8a
These files are in standard Unix mailbox format, and contain detailed
information related to the TODO list.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
From pgsql-admin-owner+M15281=pgman=candle.pha.pa.us@postgresql.org Thu Oct 21 18:57:36 2004
Return-path: <pgsql-admin-owner+M15281=pgman=candle.pha.pa.us@postgresql.org>
Received: from svr1.postgresql.org (svr1.postgresql.org [200.46.204.71])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i9LLvYf17059
for <pgman@candle.pha.pa.us>; Thu, 21 Oct 2004 17:57:34 -0400 (EDT)
Received: from localhost (unknown [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id 79D9132A71A
for <pgman@candle.pha.pa.us>; Thu, 21 Oct 2004 22:57:29 +0100 (BST)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 80515-02 for <pgman@candle.pha.pa.us>;
Thu, 21 Oct 2004 21:57:26 +0000 (GMT)
Received: from postgresql.org (svr1.postgresql.org [200.46.204.71])
by svr1.postgresql.org (Postfix) with ESMTP id 1209432A70E
for <pgman@candle.pha.pa.us>; Thu, 21 Oct 2004 22:57:29 +0100 (BST)
X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org
Received: from localhost (unknown [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id 4B39932A6C3
for <pgsql-admin-postgresql.org@localhost.postgresql.org>; Thu, 21 Oct 2004 22:51:01 +0100 (BST)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 78125-02
for <pgsql-admin-postgresql.org@localhost.postgresql.org>;
Thu, 21 Oct 2004 21:50:48 +0000 (GMT)
Received: from news.hub.org (news.hub.org [200.46.204.72])
by svr1.postgresql.org (Postfix) with ESMTP id 27F0632A6C2
for <pgsql-admin@postgresql.org>; Thu, 21 Oct 2004 22:50:49 +0100 (BST)
Received: from news.hub.org (news.hub.org [200.46.204.72])
by news.hub.org (8.12.9/8.12.9) with ESMTP id i9LLojJ7079086
for <pgsql-admin@postgresql.org>; Thu, 21 Oct 2004 21:50:45 GMT
(envelope-from news@news.hub.org)
Received: (from news@localhost)
by news.hub.org (8.12.9/8.12.9/Submit) id i9LLnd7p078783
for pgsql-admin@postgresql.org; Thu, 21 Oct 2004 21:49:39 GMT
From: Gaetano Mendola <mendola@bigfoot.com>
X-Newsgroups: comp.databases.postgresql.admin
Subject: Re: [ADMIN] replication using WAL archives
Date: Thu, 21 Oct 2004 23:49:35 +0200
Organization: PYRENET Midi-pyrenees Provider
Lines: 216
Message-ID: <41782EEF.5040708@bigfoot.com>
References: <002801c4b739$68450870$7201a8c0@mst1x5r347kymb> <1098384082.15573.14.camel@camel>
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="------------060900090803090101060101"
X-Complaints-To: abuse@pyrenet.fr
cc: iain@mst.co.jp
To: Robert Treat <xzilla@users.sourceforge.net>
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
X-Accept-Language: en-us, en
In-Reply-To: <1098384082.15573.14.camel@camel>
X-Enigmail-Version: 0.86.1.0
X-Enigmail-Supports: pgp-inline, pgp-mime
To: pgsql-admin@postgresql.org
X-Virus-Scanned: by amavisd-new at hub.org
X-Mailing-List: pgsql-admin
Precedence: bulk
Sender: pgsql-admin-owner@postgresql.org
X-Virus-Scanned: by amavisd-new at hub.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
This is a multi-part message in MIME format.
--------------060900090803090101060101
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Robert Treat wrote:
> On Thu, 2004-10-21 at 02:44, Iain wrote:
>
>>Hi,
>>
>>I thought I read something about this in relation to v8, but I can't
>>find any reference to it now... is it (or will it be) possible to do
>>master-slave style database replication by transmitting log files to the
>>standby server and having it process them?
>>
>
>
> I'm not certain if this is 8.0, but some folks have created a working
> version against the 8.0 code that will do something like this. Search
> the pgsql-hacker mail list archives for more information on it.
I sent a post on hackers, I put it here:
=======================================================================
Hi all,
I seen that Eric Kerin did the work suggested by Tom about
how to use the PITR in order to have an hot spare postgres,
writing a C program.
I did the same writing 2 shell scripts, one of them perform
the restore the other one deliver the partial filled wal and
check if the postmaster is alive ( check if the pid process
still exist ).
With these two scripts I'm able to have an hot spare installation,
and the spare one go alive when the first postmaster dies.
How test it:
1) Master node:
modify postgresql.conf using:
~ archive_command = 'cp %p /mnt/server/archivedir/%f'
~ launch postgres and perform a backup as doc
~ http://developer.postgresql.org/docs/postgres/backup-online.html
suggest to do
launch the script:
partial_wal_deliver.sh <PID> /mnt/server/partialdir <pg_xlog path>
~ this script will delivery each 10 seconds the "current" wal file,
~ and touch the "alive" file in order to notify the spare node that
~ the master node is up and running
2) Spare node:
create a recovery.conf with the line:
~ restore_command = 'restore.sh /mnt/server/archivedir/%f %p /mnt/server/partialdir'
~ replace the content of data directory with the backup performed at point 1,
~ remove any file present in the pg_xlog directory ( leaving there the archive_status
~ directory ) and remove the postmaster.pid file ( this is necessary if you are running
~ the spare postgres on the same hw ).
~ launch the postmaster, the restore will continue till the "alive" file present in the
~ /mnt/server/partialdir directory is not updated for 60 seconds ( you can modify this
~ values inside the restore.sh script ).
Be sure that restore.sh and all directories involved are accessible
Let me know.
This is a first step, of course, as Eric Kerin did, is better port these script
in C and make it more robust.
Postgres can help this process, as suggested by Tom creating a pg_current_wal()
or even better having two new GUC parameters: archive_current_wal_command and
archive_current_wal_delay.
I problem I discover during the tests is that if you shut down the spare node
and the restore_command is still waiting for a file then the postmaster will never
exit :-(
==========================================================================
I hope that is clear.
Regards
Gaetano Mendola
--------------060900090803090101060101
Content-Type: text/plain;
name="restore.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="restore.sh"
#!/bin/bash
SOURCE=$1
TARGET=$2
PARTIAL=$3
SIZE_EXPECTED=16777216 #bytes 16 MB
DIED_TIME=60 #seconds
function test_existence
{
if [ -f ${SOURCE} ]
then
COUNTER=0
#I have to check if the file is begin copied
#I assume that it will reach the right
#size in a few seconds
while [ $(stat -c '%s' ${SOURCE} ) -lt $SIZE_EXPECTED ]
do
sleep 1
let COUNTER+=1
if [ 20 -lt $COUNTER ]
then
exit 1 # BAILING OUT
fi
done
cp $SOURCE $TARGET
exit 0
fi
echo ${SOURCE}"> not found"
#if is looking for a history file and not exist
#I have suddenly exit
echo $SOURCE | grep history > /dev/null 2>&1 && exit 1
}
while [ 1 ]
do
test_existence
#CHECK IF THE MASTER IS ALIVE
DELTA_TIME=$(( $( date +'%s' ) - $( stat -c '%Z' ${PARTIAL}/alive ) ))
if [ $DIED_TIME -lt $DELTA_TIME ]
then
echo "Master is dead..."
# Master is dead
CURRENT_WAL=$( basename $SOURCE )
echo "Partial: " ${PARTIAL}
echo "Current wal: " ${CURRENT_WAL}
echo "Target: " ${TARGET}
cp ${PARTIAL}/${CURRENT_WAL}.partial ${TARGET} > /dev/null 2>&1 && exit 0
exit 1
fi
sleep 1
done
--------------060900090803090101060101
Content-Type: text/plain;
name="partial_wal_deliver.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="partial_wal_deliver.sh"
#!/bin/bash
PID=$1
PARTIAL=$2
PGXLOG=$3
function copy_last_wal
{
FILE=$( ls -t1p $PGXLOG | grep -v / | head -1 )
echo "Last Wal> " $FILE
cp ${PGXLOG}/${FILE} ${PARTIAL}/${FILE}.tmp
mv ${PARTIAL}/${FILE}.tmp ${PARTIAL}/${FILE}.partial
find ${PARTIAL} -name *.partial | grep -v ${FILE} | xargs -i rm -fr {}
}
while [ 1 ]
do
ps --pid $PID > /dev/null 2>&1
ALIVE=$?
if [ "${ALIVE}" == "1" ]
then
#The process is dead
echo "Process dead"
copy_last_wal
exit 1
fi
#The process still exist
touch ${PARTIAL}/alive
copy_last_wal
sleep 10
done
--------------060900090803090101060101
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
--------------060900090803090101060101--
From pgsql-admin-owner+M15295=pgman=candle.pha.pa.us@postgresql.org Fri Oct 22 06:32:38 2004
Return-path: <pgsql-admin-owner+M15295=pgman=candle.pha.pa.us@postgresql.org>
Received: from svr1.postgresql.org (svr1.postgresql.org [200.46.204.71])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i9M9Waf18397
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 05:32:36 -0400 (EDT)
Received: from localhost (unknown [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id 9C9A532AC61
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 10:32:32 +0100 (BST)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 53654-01 for <pgman@candle.pha.pa.us>;
Fri, 22 Oct 2004 09:32:26 +0000 (GMT)
Received: from postgresql.org (svr1.postgresql.org [200.46.204.71])
by svr1.postgresql.org (Postfix) with ESMTP id 3132D32AC53
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 10:32:32 +0100 (BST)
X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org
Received: from localhost (unknown [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id DC46E32A095
for <pgsql-admin-postgresql.org@localhost.postgresql.org>; Fri, 22 Oct 2004 10:23:07 +0100 (BST)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 49812-03
for <pgsql-admin-postgresql.org@localhost.postgresql.org>;
Fri, 22 Oct 2004 09:22:52 +0000 (GMT)
Received: from cmailg3.svr.pol.co.uk (cmailg3.svr.pol.co.uk [195.92.195.173])
by svr1.postgresql.org (Postfix) with ESMTP id 5AEA6329F2F
for <pgsql-admin@postgresql.org>; Fri, 22 Oct 2004 10:22:57 +0100 (BST)
Received: from modem-21.monkey.dialup.pol.co.uk ([217.135.208.21] helo=Nightingale)
by cmailg3.svr.pol.co.uk with smtp (Exim 4.41)
id 1CKvdM-0005eh-NO; Fri, 22 Oct 2004 10:22:53 +0100
Message-ID: <011a01c4b818$b7370a20$06e887d9@Nightingale>
From: "Simon Riggs" <simon@2ndquadrant.com>
To: "Gaetano Mendola" <mendola@bigfoot.com>,
"Robert Treat" <xzilla@users.sourceforge.net>, <pgsql-admin@postgresql.org>
cc: <iain@mst.co.jp>
References: <002801c4b739$68450870$7201a8c0@mst1x5r347kymb> <1098384082.15573.14.camel@camel> <41782EEF.5040708@bigfoot.com>
Subject: Re: [ADMIN] replication using WAL archives
Date: Fri, 22 Oct 2004 10:22:54 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Virus-Scanned: by amavisd-new at hub.org
X-Mailing-List: pgsql-admin
Precedence: bulk
Sender: pgsql-admin-owner@postgresql.org
X-Virus-Scanned: by amavisd-new at hub.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
> Gaetano Mendola wrote
> Postgres can help this process, as suggested by Tom creating a
pg_current_wal()
> or even better having two new GUC parameters: archive_current_wal_command
and
> archive_current_wal_delay.
OK, we can modify the archiver to do this as well as the archive-when-full
functionality. I'd already agreed to do something similar for 8.1
PROPOSAL:
By default, archive_max_delay would be 10 seconds.
By default, archive_current_wal_command is not set.
If archive_current_wal_command is not set, the archiver will archive a file
using archive_command only when the file is full.
If archive_current_wal_command is set, the archiver would archive a file
whichever of these occurs first...
- it is full
- the archive_max_delay timeout occurs (default: disabled)
...as you can see I've renamed archive_current_wal_delay to reflect the fact
that there is an interaction between the current mechanism (only when full)
and this additional mechanism (no longer than X secs between log files).
With that design, if the logs are being created quickly enough, then a
partial log file is never created, only full ones.
When an xlog file is archived because it is full, then it is sent to both
archive_current_wal_command and archive_command (in that order). When the
timeout occurs and we have a partial xlog file, it would only be sent to
archive_current_wal_command. It may also be desirable to not use
archive_command at all, only to use archive_current_wal_command. That's not
currently possible because archive_command is the switch by which all of the
archive functioanlity is enabled, so you can't actually turn this off.
There is already a timeout feature designed into archiver for safety...so I
can make that read the GUCs, above and act accordingly.
There is an unresolved resilience issue: if the archiver goes down (or
whatever does the partial_wal copy functionality) then it it is possible
that users will continue writing to the database and creating xlog records.
It would be up to the user to define how to handle records that had been
committed to the first database in the interim before cutover. It would also
be up to the user to shut down the first node from the second - Shoot the
Other Node in the Head, as its known. All of that is up to the second node,
and as Tom says, is "the hard part"....I'm not proposing to do anything
about that at this stage, since it is implementation dependant.
I was thinking perhaps to move to having variable size xlog files, since
their contents are now variable - no padded records at EOF. If we did that,
then the archiver could simply issue a "switch logfile" and then the
archiver would cut in anyway to copy away the xlog. Having said that it is
lots easier just to put a blind timeout in the archiver and copy the file -
though I'm fairly uneasy about the point that we'd be ignoring the fact that
many people are still writing to it. But I propose doing the easy way....
Thoughts?
= - = - =
Gaetano - skim-reading your script, how do you handle the situation when a
new xlog file has been written within 10 seconds? That way the current file
number will have jumped by 2, so when your script looks for the "Last wal"
using head -1 it will find the N+2 and the intermediate file will never be
copied. Looks like a problem to me...
> I problem I discover during the tests is that if you shut down the spare
node
> and the restore_command is still waiting for a file then the postmaster
will never
> exit :-(
Hmm....Are you reporting this as a bug for 8.0? It's not on the bug list...
Do we consider that to be desirable or not?
Best Regards, Simon Riggs
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
From pgsql-admin-owner+M15302=pgman=candle.pha.pa.us@postgresql.org Fri Oct 22 13:56:14 2004
Return-path: <pgsql-admin-owner+M15302=pgman=candle.pha.pa.us@postgresql.org>
Received: from svr1.postgresql.org (svr1.postgresql.org [200.46.204.71])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i9MGuCf28637
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 12:56:13 -0400 (EDT)
Received: from localhost (unknown [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id 54E77EAEDAA
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 17:55:51 +0100 (BST)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 86116-09 for <pgman@candle.pha.pa.us>;
Fri, 22 Oct 2004 16:55:57 +0000 (GMT)
Received: from postgresql.org (svr1.postgresql.org [200.46.204.71])
by svr1.postgresql.org (Postfix) with ESMTP id 0EC98EAEDA7
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 17:55:51 +0100 (BST)
X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org
Received: from localhost (unknown [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id 5DB98EAEDBE
for <pgsql-admin-postgresql.org@localhost.postgresql.org>; Fri, 22 Oct 2004 17:45:13 +0100 (BST)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 82473-08
for <pgsql-admin-postgresql.org@localhost.postgresql.org>;
Fri, 22 Oct 2004 16:45:11 +0000 (GMT)
Received: from pns.mm.eutelsat.org (pns.mm.eutelsat.org [194.214.173.227])
by svr1.postgresql.org (Postfix) with ESMTP id E49F0EAEDB5
for <pgsql-admin@postgresql.org>; Fri, 22 Oct 2004 17:45:00 +0100 (BST)
Received: from nts-03.mm.eutelsat.org (localhost [127.0.0.1])
by pns.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i9MGh0U26124;
Fri, 22 Oct 2004 18:43:01 +0200
Received: from [127.0.0.1] (accesspoint.mm.eutelsat.org [194.214.173.4])
by nts-03.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i9MGj5f09681;
Fri, 22 Oct 2004 18:45:05 +0200
Message-ID: <4179390B.10700@bigfoot.com>
Date: Fri, 22 Oct 2004 18:44:59 +0200
From: Gaetano Mendola <mendola@bigfoot.com>
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Simon Riggs <simon@2ndquadrant.com>
cc: Robert Treat <xzilla@users.sourceforge.net>, pgsql-admin@postgresql.org,
iain@mst.co.jp
Subject: Re: [ADMIN] replication using WAL archives
References: <002801c4b739$68450870$7201a8c0@mst1x5r347kymb> <1098384082.15573.14.camel@camel> <41782EEF.5040708@bigfoot.com> <011a01c4b818$b7370a20$06e887d9@Nightingale>
In-Reply-To: <011a01c4b818$b7370a20$06e887d9@Nightingale>
X-Enigmail-Version: 0.86.1.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by amavisd-new at hub.org
X-Mailing-List: pgsql-admin
Precedence: bulk
Sender: pgsql-admin-owner@postgresql.org
X-Virus-Scanned: by amavisd-new at hub.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Simon Riggs wrote:
|>Gaetano Mendola wrote
|>Postgres can help this process, as suggested by Tom creating a
|
| pg_current_wal()
|
|>or even better having two new GUC parameters: archive_current_wal_command
|
| and
|
|>archive_current_wal_delay.
|
|
| OK, we can modify the archiver to do this as well as the archive-when-full
| functionality. I'd already agreed to do something similar for 8.1
|
| PROPOSAL:
| By default, archive_max_delay would be 10 seconds.
| By default, archive_current_wal_command is not set.
| If archive_current_wal_command is not set, the archiver will archive a file
| using archive_command only when the file is full.
| If archive_current_wal_command is set, the archiver would archive a file
| whichever of these occurs first...
| - it is full
| - the archive_max_delay timeout occurs (default: disabled)
| ...as you can see I've renamed archive_current_wal_delay to reflect the fact
| that there is an interaction between the current mechanism (only when full)
| and this additional mechanism (no longer than X secs between log files).
| With that design, if the logs are being created quickly enough, then a
| partial log file is never created, only full ones.
|
| When an xlog file is archived because it is full, then it is sent to both
| archive_current_wal_command and archive_command (in that order). When the
| timeout occurs and we have a partial xlog file, it would only be sent to
| archive_current_wal_command. It may also be desirable to not use
| archive_command at all, only to use archive_current_wal_command. That's not
| currently possible because archive_command is the switch by which all of the
| archive functioanlity is enabled, so you can't actually turn this off.
It seems good to me, the script behind archive command can be a nop if someone
want use the archive_current_wal_command
| = - = - =
|
| Gaetano - skim-reading your script, how do you handle the situation when a
| new xlog file has been written within 10 seconds? That way the current file
| number will have jumped by 2, so when your script looks for the "Last wal"
| using head -1 it will find the N+2 and the intermediate file will never be
| copied. Looks like a problem to me...
Yes, the only window failure I seen ( but I don't know if it's possible )
Master:
~ log N created
log N filled
archive log N
log N+1 created
log N+1 filled
~ log N+2 created
~ <---- the master die here before to archive the log N+1
~ archive log N+1
in this case as you underline tha last log archived is the N and the N+2
partial wal is added to archived wal collection and in the recovery fase
the recovery stop after processing the log N.
Is it possible that the postmaster create the N+2 file without finish to archive
the N+1 ? ( I suspect yes :-( )
The only cure I see here is to look for not archived WAL ( if possible ).
|>I problem I discover during the tests is that if you shut down the spare
|>node and the restore_command is still waiting for a file then the postmaster
|>will never exit :-(
|
|
| Hmm....Are you reporting this as a bug for 8.0? It's not on the bug list...
For me is a behave to avoid.
Regards
Gaetano Mendola
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBeTkJ7UpzwH2SGd4RAsMxAKCbV7W+wrGBocf2Ftlthm0egAlIWACgp87L
KU/YusyHuvT7jSFwZVKpP3M=
=rWZx
-----END PGP SIGNATURE-----
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
From pgsql-admin-owner+M15303=pgman=candle.pha.pa.us@postgresql.org Fri Oct 22 14:43:36 2004
Return-path: <pgsql-admin-owner+M15303=pgman=candle.pha.pa.us@postgresql.org>
Received: from svr1.postgresql.org (svr1.postgresql.org [200.46.204.71])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i9MHhZf06453
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 13:43:35 -0400 (EDT)
Received: from localhost (unknown [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id 01DD2EADBB7
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 18:43:13 +0100 (BST)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 01872-03 for <pgman@candle.pha.pa.us>;
Fri, 22 Oct 2004 17:43:19 +0000 (GMT)
Received: from postgresql.org (svr1.postgresql.org [200.46.204.71])
by svr1.postgresql.org (Postfix) with ESMTP id 9E633EADAD4
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 18:43:12 +0100 (BST)
X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org
Received: from localhost (unknown [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id C1133EAED89
for <pgsql-admin-postgresql.org@localhost.postgresql.org>; Fri, 22 Oct 2004 18:31:20 +0100 (BST)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 97130-03
for <pgsql-admin-postgresql.org@localhost.postgresql.org>;
Fri, 22 Oct 2004 17:31:17 +0000 (GMT)
Received: from cmailm2.svr.pol.co.uk (cmailm2.svr.pol.co.uk [195.92.193.210])
by svr1.postgresql.org (Postfix) with ESMTP id 276CAEADBBD
for <pgsql-admin@postgresql.org>; Fri, 22 Oct 2004 18:31:07 +0100 (BST)
Received: from modem-558.snake.dialup.pol.co.uk ([62.137.114.46] helo=[192.168.0.102])
by cmailm2.svr.pol.co.uk with esmtp (Exim 4.41)
id 1CL3G3-0001Tx-K5; Fri, 22 Oct 2004 18:31:20 +0100
Subject: Re: [ADMIN] replication using WAL archives
From: Simon Riggs <simon@2ndquadrant.com>
To: Gaetano Mendola <mendola@bigfoot.com>
cc: Robert Treat <xzilla@users.sourceforge.net>, pgsql-admin@postgresql.org,
iain@mst.co.jp
In-Reply-To: <4179390B.10700@bigfoot.com>
References: <002801c4b739$68450870$7201a8c0@mst1x5r347kymb>
<1098384082.15573.14.camel@camel> <41782EEF.5040708@bigfoot.com>
<011a01c4b818$b7370a20$06e887d9@Nightingale> <4179390B.10700@bigfoot.com>
Content-Type: text/plain
Organization: 2nd Quadrant
Message-ID: <1098466150.20926.13.camel@localhost.localdomain>
MIME-Version: 1.0
X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2)
Date: Fri, 22 Oct 2004 18:29:10 +0100
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by amavisd-new at hub.org
X-Mailing-List: pgsql-admin
Precedence: bulk
Sender: pgsql-admin-owner@postgresql.org
X-Virus-Scanned: by amavisd-new at hub.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
On Fri, 2004-10-22 at 17:44, Gaetano Mendola wrote:
> | Gaetano - skim-reading your script, how do you handle the situation when a
> | new xlog file has been written within 10 seconds? That way the current file
> | number will have jumped by 2, so when your script looks for the "Last wal"
> | using head -1 it will find the N+2 and the intermediate file will never be
> | copied. Looks like a problem to me...
>
>
> Yes, the only window failure I seen ( but I don't know if it's possible )
>
> Master:
> ~ log N created
> log N filled
> archive log N
> log N+1 created
> log N+1 filled
> ~ log N+2 created
> ~ <---- the master die here before to archive the log N+1
> ~ archive log N+1
>
>
> in this case as you underline tha last log archived is the N and the N+2
> partial wal is added to archived wal collection and in the recovery fase
> the recovery stop after processing the log N.
>
> Is it possible that the postmaster create the N+2 file without finish to archive
> the N+1 ? ( I suspect yes :-( )
>
> The only cure I see here is to look for not archived WAL ( if possible ).
>
Hmm...well you aren't looking for archived wal, you're just looking at
wal...which is a different thing...
Situation I thought I saw was:
- copy away current partial filled xlog N
- xlog N fills, N+1 starts
- xlog N+1 fills, N+2 starts
- copy away current partial filled xlog: N+2 (+10 secs later)
i.e. if time to fill xlog (is ever) < time to copy away current xlog,
then you miss one.
So problem: you can miss one and never know you've missed one until the
recovery can't find it, which it never returns from...so it just hangs.
[Just so we're all clear: we're talking about Gaetano's script, not the
PostgreSQL archver. The postgresql archiver doesn't do it that way, so
it never misses one.]
--
Best Regards, Simon Riggs
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
From pgsql-admin-owner+M15306=pgman=candle.pha.pa.us@postgresql.org Fri Oct 22 17:56:07 2004
Return-path: <pgsql-admin-owner+M15306=pgman=candle.pha.pa.us@postgresql.org>
Received: from svr1.postgresql.org (svr1.postgresql.org [200.46.204.71])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i9MKu6f05264
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 16:56:06 -0400 (EDT)
Received: from localhost (unknown [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id 4F4C2EAE4AE
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 21:55:41 +0100 (BST)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 62857-05 for <pgman@candle.pha.pa.us>;
Fri, 22 Oct 2004 20:55:48 +0000 (GMT)
Received: from postgresql.org (svr1.postgresql.org [200.46.204.71])
by svr1.postgresql.org (Postfix) with ESMTP id 095CEEAE4AC
for <pgman@candle.pha.pa.us>; Fri, 22 Oct 2004 21:55:41 +0100 (BST)
X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org
Received: from localhost (unknown [200.46.204.144])
by svr1.postgresql.org (Postfix) with ESMTP id 3FC9BEAE486
for <pgsql-admin-postgresql.org@localhost.postgresql.org>; Fri, 22 Oct 2004 21:50:48 +0100 (BST)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024)
with ESMTP id 62565-02
for <pgsql-admin-postgresql.org@localhost.postgresql.org>;
Fri, 22 Oct 2004 20:50:48 +0000 (GMT)
Received: from news.hub.org (news.hub.org [200.46.204.72])
by svr1.postgresql.org (Postfix) with ESMTP id 06C49EAE46B
for <pgsql-admin@postgresql.org>; Fri, 22 Oct 2004 21:50:40 +0100 (BST)
Received: from news.hub.org (news.hub.org [200.46.204.72])
by news.hub.org (8.12.9/8.12.9) with ESMTP id i9MKolJB062812
for <pgsql-admin@postgresql.org>; Fri, 22 Oct 2004 20:50:48 GMT
(envelope-from news@news.hub.org)
Received: (from news@localhost)
by news.hub.org (8.12.9/8.12.9/Submit) id i9MKoRHh062731
for pgsql-admin@postgresql.org; Fri, 22 Oct 2004 20:50:27 GMT
From: Gaetano Mendola <mendola@bigfoot.com>
X-Newsgroups: comp.databases.postgresql.admin
Subject: Re: [ADMIN] replication using WAL archives
Date: Fri, 22 Oct 2004 22:50:34 +0200
Organization: PYRENET Midi-pyrenees Provider
Lines: 39
Message-ID: <4179729A.5020401@bigfoot.com>
References: <002801c4b739$68450870$7201a8c0@mst1x5r347kymb> <1098384082.15573.14.camel@camel> <41782EEF.5040708@bigfoot.com> <011a01c4b818$b7370a20$06e887d9@Nightingale> <4179390B.10700@bigfoot.com> <1098466150.20926.13.camel@localhost.localdomain>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@pyrenet.fr
To: Simon Riggs <simon@2ndquadrant.com>
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
X-Accept-Language: en-us, en
In-Reply-To: <1098466150.20926.13.camel@localhost.localdomain>
X-Enigmail-Version: 0.86.1.0
X-Enigmail-Supports: pgp-inline, pgp-mime
To: pgsql-admin@postgresql.org
X-Virus-Scanned: by amavisd-new at hub.org
X-Mailing-List: pgsql-admin
Precedence: bulk
Sender: pgsql-admin-owner@postgresql.org
X-Virus-Scanned: by amavisd-new at hub.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
Simon Riggs wrote:
> Situation I thought I saw was:
>
> - copy away current partial filled xlog N
> - xlog N fills, N+1 starts
> - xlog N+1 fills, N+2 starts
> - copy away current partial filled xlog: N+2 (+10 secs later)
>
> i.e. if time to fill xlog (is ever) < time to copy away current xlog,
> then you miss one.
>
> So problem: you can miss one and never know you've missed one until the
> recovery can't find it, which it never returns from...so it just hangs.
No. The restore.sh is not smart enough to know the last wal that must be
replayed, the only "smart thing" is to copy the supposed "current wal" in the
archive directory.
The script hang (and is a feature not a bug) if and only if the master is alive
( at least I'm not seeing any other hang ).
In your example in the archived directory will be present the files until logN
and logN+2 ( the current wal ) is in the partial directory, if the master die,
the restore.sh will copy logN+2 in the archived directory, the spare node will
execute restore.sh with file logN+1 as argument and if is not found then the
restore.sh will exit.
Regards
Gaetano Mendola
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
From pgsql-hackers-owner+M48909@postgresql.org Thu Jan 8 21:54:03 2004
Return-path: <pgsql-hackers-owner+M48909@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i092s2X02439
for <pgman@candle.pha.pa.us>; Thu, 8 Jan 2004 21:54:02 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AemmG-0002Wx-5B; Thu, 08 Jan 2004 20:53:36 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 88703D1B46E
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Mon, 5 Jan 2004 02:00:10 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 72572-01
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sun, 4 Jan 2004 21:59:23 -0400 (AST)
Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39])
by svr1.postgresql.org (Postfix) with ESMTP id DD336D1B454
for <pgsql-hackers@postgresql.org>; Sun, 4 Jan 2004 21:59:04 -0400 (AST)
Received: from lorenso.com (c-24-1-26-144.client.comcast.net[24.1.26.144])
by comcast.net (rwcrmhc13) with ESMTP
id <20040105015908015005cvvee>; Mon, 5 Jan 2004 01:59:08 +0000
Message-ID: <3FF8C4E6.9090008@lorenso.com>
Date: Sun, 04 Jan 2004 19:59:02 -0600
From: "D. Dante Lorenso" <dante@lorenso.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: "Alex J. Avriette" <alex@posixnap.net>
cc: Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] psql \d option list overloaded
References: <3FEE6DFB.9040408@lorenso.com> <200401040125.i041PLR14687@candle.pha.pa.us> <20040104191322.GD8524@posixnap.net>
In-Reply-To: <20040104191322.GD8524@posixnap.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.8 required=5.0 tests=BAYES_00,HTML_MESSAGE
autolearn=no version=2.61
Status: OR
Alex J. Avriette wrote:
>On Sat, Jan 03, 2004 at 08:25:21PM -0500, Bruce Momjian wrote:
>
>
>>>I finally figure it out, I just end up forgetting again later. I still
>>>have no clue how I'd find the same data without using psql. In MySQL
>>>I can run those queries from PHP, PERL...etc. I know you can find that
>>>data in system tables in PostgreSQL, but I don't wanna muck around with
>>>all that. I just wanna do something as simple as MySQL.
>>>
>>>
>>[ Moved to hackers.]
>>
>>I am starting to agree that our \d* handling is just too overloaded.
>>Look at the option list from \?:
>>
>>
>>I like the idea of adding a new syntax to show that information using
>>simple SQL command syntax, and putting it in the backend so all
>>applications can access it. I know we have information schema, and
>>maybe that can be used to make this simpler.
>>
>>
>Bruce, while I agree with you about \d (and all its children), as well
>as the querying we talked about on irc, I disagree with the notion of a
>"SHOW DATABASES" query. This is one of the things that irritates me
>about mysql is the pseudo-sql that everyone has come to accept ... It doesn't
>make sense to create pseudo-sql, when all you're abstracting is function-macros...
>
Anything other than simple, short commands is a waste, IMHO. I can easily
remember SHOW DATABASES and SHOW TABLES and DESC <table>, because they
reflect
my intensions directly and 'make sense'.
Using the slash commands works if you are familiar with them ... sorta
like 'ls' switches (I type 'ls -alF' without thinking about what those
switches do because it's embedded in my head from years of repetition.
Any other flags to 'ls', and I gotta go hit the man pages.)
What's more important is the ability to use these commands from any
interface not just 'psql' client. I think 'psql' already has the slash
commands. No need to create NEW slash commands there...
>If you want to find out how to show the databases in sql, use psql -E.
>
>
Have you actually done that? OMG!
1) Using System Catalogs ... (from psql -E)
SELECT n.nspname as "Schema",
c.relname as "Name",
CASE c.relkind
WHEN 'r' THEN 'table'
WHEN 'v' THEN 'view'
WHEN 'i' THEN 'index'
WHEN 'S' THEN 'sequence'
WHEN 's' THEN 'special' END as "Type",
u.usename as "Owner"
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_user u ON u.usesysid = c.relowner
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r','')
AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
AND pg_catalog.pg_table_is_visible(c.oid)
ORDER BY 1,2;
or ...
2) (using information schema ... little better)
SELECT table_name FROM information_schema.tables WHERE table_schema
= 'public';
or ...
3) like MySQL does it...
SHOW TABLES;
Lemme think about which one I prefer ;-) Uh, Ok, I'm done thinking
now. hehe.
There's something to be said about the 'SHOW'and 'DESC' sql-extensions
added into MySQL. Newbies can really 'get' it quickly. It's what really
sold me on MySQL when I first learned it. For me, it's like:
'dir' in DOS,
'ls' in Unix
'SHOW' in MySQL
??? in PostgreSQL ?
Sure, with time as my database needs grew and I matured as a developer,
I eventually gained more respect for PostgreSQL and have made the switch
even without this feature, but to this day, I really think MySQL *did it
right* with those extensions. You can't become a PostgreSQL guru without
being a newbie first. I vote we make it easier for newbies.
Dante
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
From pgsql-hackers-owner+M48908@postgresql.org Thu Jan 8 21:50:03 2004
Return-path: <pgsql-hackers-owner+M48908@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i092ntX01459
for <pgman@candle.pha.pa.us>; Thu, 8 Jan 2004 21:50:03 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AemiO-0002D1-Di; Thu, 08 Jan 2004 20:49:36 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 7FD9BD1B473
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Mon, 5 Jan 2004 02:05:14 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 70484-09
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sun, 4 Jan 2004 22:04:28 -0400 (AST)
Received: from news.hub.org (news.hub.org [200.46.204.72])
by svr1.postgresql.org (Postfix) with ESMTP id 8F8CAD1BB73
for <pgsql-hackers@postgresql.org>; Sun, 4 Jan 2004 22:04:16 -0400 (AST)
Received: from news.hub.org (news.hub.org [200.46.204.72])
by news.hub.org (8.12.9/8.12.9) with ESMTP id i0524DU6041774
for <pgsql-hackers@postgresql.org>; Mon, 5 Jan 2004 02:04:13 GMT
(envelope-from news@news.hub.org)
Received: (from news@localhost)
by news.hub.org (8.12.9/8.12.9/Submit) id i0521bd7040362
for pgsql-hackers@postgresql.org; Mon, 5 Jan 2004 02:01:37 GMT
From: "William ZHANG" <uniware_at_zedware_dot_org@antispam.com>
X-Newsgroups: comp.databases.postgresql.hackers
Subject: Re: [HACKERS] psql \d option list overloaded
Date: Mon, 5 Jan 2004 10:00:55 +0800
Organization: N/A
Lines: 6
Message-ID: <btagi0$17bq$1@news.hub.org>
References: <3FEE6DFB.9040408@lorenso.com> <200401040125.i041PLR14687@candle.pha.pa.us>
X-Complaints-To: usenet@news.hub.org
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
To: pgsql-hackers@postgresql.org
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-3.7 required=5.0 tests=BAYES_00,PRIORITY_NO_NAME
autolearn=no version=2.61
Status: OR
I think moving the \d and simliar features in psql
to SQL is a good idea. That will make the features
available in any client library. As for the syntax,
maybe a investigation is needed.
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
From pgsql-hackers-owner+M48835=pgman=candle.pha.pa.us@postgresql.org Tue Jan 6 03:08:59 2004
Return-path: <pgsql-hackers-owner+M48835=pgman=candle.pha.pa.us@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0688wX03365
for <pgman@candle.pha.pa.us>; Tue, 6 Jan 2004 03:08:59 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AdmGn-0006qB-5D
for pgman@candle.pha.pa.us; Tue, 06 Jan 2004 02:08:57 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 6D470D1B446
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Tue, 6 Jan 2004 08:02:13 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 19966-06
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Tue, 6 Jan 2004 04:01:30 -0400 (AST)
Received: from mail.eckpart.de (unknown [62.206.85.106])
by svr1.postgresql.org (Postfix) with SMTP id C278CD1B46E
for <pgsql-hackers@postgresql.org>; Tue, 6 Jan 2004 04:01:06 -0400 (AST)
Received: (qmail 349 invoked from network); 6 Jan 2004 08:01:11 -0000
Received: from unknown (HELO at13.eckpart.de) (192.168.41.70)
by cserv.eckpart.de with SMTP; 6 Jan 2004 08:01:11 -0000
From: Tommi Maekitalo <t.maekitalo@epgmbh.de>
Organization: Dr. Eckhardt + Partner GmbH
To: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] psql \d option list overloaded
Date: Tue, 6 Jan 2004 09:01:10 +0100
User-Agent: KMail/1.5.4
References: <3FEE6DFB.9040408@lorenso.com> <200401040125.i041PLR14687@candle.pha.pa.us> <20040104191322.GD8524@posixnap.net>
In-Reply-To: <20040104191322.GD8524@posixnap.net>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-ID: <200401060901.10830.t.maekitalo@epgmbh.de>
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
Am Sonntag, 4. Januar 2004 20:13 schrieb Alex J. Avriette:
> On Sat, Jan 03, 2004 at 08:25:21PM -0500, Bruce Momjian wrote:
> > > I finally figure it out, I just end up forgetting again later. I still
...
>
> /functions
> /databases
>
...
Long options sounds really good. It is like GNU-tools. A single - for single
character options and a double -- for long options.
Ah - a single \ for short options in postgresql and a double \\ for long? What
do you think?
--
Dr. Eckhardt + Partner GmbH
http://www.epgmbh.de
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
From pgsql-hackers-owner+M48912@postgresql.org Thu Jan 8 22:37:54 2004
Return-path: <pgsql-hackers-owner+M48912@postgresql.org>
Received: from hosting.commandprompt.com (216.commandprompt.com [207.173.200.216])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i093bpX02244
for <pgman@candle.pha.pa.us>; Thu, 8 Jan 2004 22:37:52 -0500 (EST)
Received: from postgresql.org (svr1.postgresql.org [200.46.204.71])
by hosting.commandprompt.com (8.11.6/8.11.6) with ESMTP id i093U0k32213;
Thu, 8 Jan 2004 19:30:33 -0800
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 95E70D1B43E
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Fri, 9 Jan 2004 03:29:43 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 28908-10
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Thu, 8 Jan 2004 23:28:57 -0400 (AST)
Received: from mail.hive.nj2.inquent.com (mc.carriermail.com [205.178.180.9])
by svr1.postgresql.org (Postfix) with SMTP id E42E8D1B48A
for <pgsql-hackers@postgresql.org>; Thu, 8 Jan 2004 23:27:26 -0400 (AST)
Received: (qmail 28537 invoked from network); 9 Jan 2004 03:27:33 -0000
Received: from unknown (HELO ?192.168.1.199?) (134.22.68.14)
by 205.178.180.9 with SMTP; 9 Jan 2004 03:27:33 -0000
Subject: Re: [HACKERS] psql \d option list overloaded
From: Rod Taylor <pg@rbt.ca>
To: "D. Dante Lorenso" <dante@lorenso.com>
cc: "Alex J. Avriette" <alex@posixnap.net>,
Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL Development <pgsql-hackers@postgresql.org>
In-Reply-To: <3FF8C4E6.9090008@lorenso.com>
References: <3FEE6DFB.9040408@lorenso.com>
<200401040125.i041PLR14687@candle.pha.pa.us>
<20040104191322.GD8524@posixnap.net> <3FF8C4E6.9090008@lorenso.com>
Content-Type: text/plain
Message-ID: <1073618847.322.29.camel@jester>
MIME-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5
Date: Thu, 08 Jan 2004 22:27:28 -0500
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.8 required=5.0 tests=BAYES_00,HTML_MESSAGE
autolearn=no version=2.61
Status: OR
> Anything other than simple, short commands is a waste, IMHO. I can easily
> remember SHOW DATABASES and SHOW TABLES and DESC <table>, because they
> reflect
> my intensions directly and 'make sense'.
Can you remember how to get a list of indexes on a particular table? How
about a specific indexes build? I ask, because I constantly forgot both
of those (don't like FROM).
> 2) (using information schema ... little better)
>
> SELECT table_name FROM information_schema.tables WHERE table_schema
> = 'public';
>
> or ...
>
> 3) like MySQL does it...
>
> SHOW TABLES;
>
> Lemme think about which one I prefer ;-) Uh, Ok, I'm done thinking
> now. hehe.
I actually prefer #2 myself. It works on a number of databases aside
from just PostgreSQL. So, as a user who worked in a mixed environment it
was easier to remember.
But I get your point.
> Sure, with time as my database needs grew and I matured as a developer,
> I eventually gained more respect for PostgreSQL and have made the switch
> even without this feature, but to this day, I really think MySQL *did it
> right* with those extensions. You can't become a PostgreSQL guru without
I agree with the simple SHOW TABLES command but disagree with:
SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [LIKE wild]
I much prefer:
SELECT * FROM COLUMNS WHERE table LIKE '%tab%' AND database = 'billing';
It's not much longer, certainly more natural to those that know SQL, and
infinitely more useful since you can create result sets that the
programmer of SHOW hadn't considered. A perfect example is the addition
of the FULL clause in SHOW. The above select does not need additional
keywords for different formatting options as it can simply use "natural"
SQL styling.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
From tswan@idigx.com Fri Jan 9 02:07:40 2004
Return-path: <tswan@idigx.com>
Received: from stubee.d2hosting.net (d2hosting.net [66.70.41.160])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0977cX28507
for <pgman@candle.pha.pa.us>; Fri, 9 Jan 2004 02:07:40 -0500 (EST)
Received: from idigx.com (adsl-159-238-227.mob.bellsouth.net [68.159.238.227])
by stubee.d2hosting.net (8.11.6/linuxconf) with ESMTP id i0977Qn08421;
Fri, 9 Jan 2004 01:07:26 -0600
Message-ID: <3FFE532C.2090503@idigx.com>
Date: Fri, 09 Jan 2004 01:07:24 -0600
From: Thomas Swan <tswan@idigx.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
cc: Bruce Momjian <pgman@candle.pha.pa.us>
Subject: Re: [HACKERS] psql \d option list overloaded
References: <200401060504.i0654B012562@candle.pha.pa.us>
In-Reply-To: <200401060504.i0654B012562@candle.pha.pa.us>
X-Enigmail-Version: 0.82.5.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.8 required=5.0 tests=BAYES_00,HTML_MESSAGE
autolearn=ham version=2.61
Status: OR
Bruce Momjian wrote:
>Alex J. Avriette wrote:
>
>
>>On Sun, Jan 04, 2004 at 07:59:02PM -0600, D. Dante Lorenso wrote:
>>
>>
>>
>>>Anything other than simple, short commands is a waste, IMHO. I can easily
>>>remember SHOW DATABASES and SHOW TABLES and DESC <table>, because they
>>>reflect
>>>my intensions directly and 'make sense'.
>>>
>>>
>>What makes sense to me in csh doesn't make sense in a bourne shell.
>>You can't expect all applications to work correctly. I'd like to second
>>Peter's "yep" when asked if he could remember all the various \d*
>>commands. It really comes down to whether you're trying. New software
>>(even though you may have been using it for a year) requires some
>>adjustment.
>>
>>
>
>OK, I will drop the idea. Thanks.
>
>
>
Bruce,
The idea is not without merit. What you are looking at is a way to get
this information as a query without having to know all the intricasies
of all the pg_* internals or duplicating complex queries. "psql -E"
shows you just how tricky this is. Secondly, if this information
changes in a release, then the end user has to rewrite all of the
queries to work. Being able to issue a query to the dbms and get the
information as a normal SQL result makes sense and is definately convenient.
The \d* commands work from psql but not from anywhere else. Try
getting the information from a PHP script by sending a "\dS" query. It
doesn't work. If the same queries were stored in the backend and
referenced by psql and also could be referenced by other scripts, this
would be a good thing and keep the work centralized. If the queries
were in the backend, the psql users could keep the \dS command but it
would call an internal function or execute a queried stored in the
system tables.
One option is to get the information via a function like
SELECT * FROM pg_info('tables');
SELECT * FROM pg_info('indexes');
"psql -E" would show the same query being executed for "\dt"
Another option if no one wanted a language construct, perhaps one option
would be to store the queries themselves in a table like pg_queries.
This also has the advantage of exposing the queries used so that they
can used as examples for other purposes.
+------------+------------------------------------------+
|pg_info_type|pg_query |
+------------+------------------------------------------+
|tables |SELECT n.nspname as "Schema", c.relname |
| |as "Name", CASE c.relkind WHEN 'r' THEN |
| |'table' WHEN 'v' THEN 'view' WHEN 'i' THEN|
| |'index' WHEN 'S' THEN 'sequence' WHEN 's' |
| |THEN 'special' END as "Type", u.usename as|
| |"Owner" FROM pg_catalog.pg_class c LEFT |
| |JOIN pg_catalog.pg_user u ON u.usesysid = |
| |c.relowner LEFT JOIN |
| |pg_catalog.pg_namespace n ON n.oid = |
| |c.relnamespace WHERE c.relkind IN ('r','')|
| |AND n.nspname NOT IN ('pg_catalog', |
| |'pg_toast') AND |
| |pg_catalog.pg_table_is_visible(c.oid) |
| |ORDER BY 1,2; |
+------------+------------------------------------------+
|indexes |SELECT n.nspname as "Schema", c.relname as|
| |"Name", CASE c.relkind WHEN 'r' THEN |
| |'table' WHEN 'v' THEN 'view' WHEN 'i' THEN|
| |'index' WHEN 'S' THEN 'sequence' WHEN 's' |
| |THEN 'special' END as "Type", u.usename as|
| |"Owner", c2.relname as "Table" FROM |
| |pg_catalog.pg_class c JOIN |
| |pg_catalog.pg_index i ON i.indexrelid = |
| |c.oid JOIN pg_catalog.pg_class c2 ON |
| |i.indrelid = c2.oid LEFT JOIN |
| |pg_catalog.pg_user u ON u.usesysid = |
| |c.relowner LEFT JOIN |
| |pg_catalog.pg_namespace n ON n.oid = |
| |c.relnamespace WHERE c.relkind IN ('i','')|
| |AND n.nspname NOT IN ('pg_catalog', |
| |'pg_toast') AND |
| |pg_catalog.pg_table_is_visible(c.oid) |
| |ORDER BY 1,2; |
+------------+------------------------------------------+
Again, this is just food for thought. Perhaps it is a way to satisfy
both arguments.
Thomas
From pgsql-hackers-owner+M48922@postgresql.org Fri Jan 9 05:23:03 2004
Return-path: <pgsql-hackers-owner+M48922@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i09AN1X10448
for <pgman@candle.pha.pa.us>; Fri, 9 Jan 2004 05:23:02 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AetmQ-000637-HX; Fri, 09 Jan 2004 04:22:14 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id DCA3ED1B447
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Fri, 9 Jan 2004 10:20:50 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 95279-02
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Fri, 9 Jan 2004 06:20:04 -0400 (AST)
Received: from mail.eckpart.de (unknown [62.206.85.106])
by svr1.postgresql.org (Postfix) with SMTP id 34AE7D1B4C6
for <pgsql-hackers@postgresql.org>; Fri, 9 Jan 2004 06:19:45 -0400 (AST)
Received: (qmail 21196 invoked from network); 9 Jan 2004 10:19:46 -0000
Received: from unknown (HELO at13.eckpart.de) (192.168.41.70)
by cserv.eckpart.de with SMTP; 9 Jan 2004 10:19:46 -0000
From: Tommi Maekitalo <t.maekitalo@epgmbh.de>
Organization: Dr. Eckhardt + Partner GmbH
To: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] psql \d option list overloaded
Date: Fri, 9 Jan 2004 11:19:45 +0100
User-Agent: KMail/1.5.4
References: <3FEE6DFB.9040408@lorenso.com> <20040104191322.GD8524@posixnap.net> <3FF8C4E6.9090008@lorenso.com>
In-Reply-To: <3FF8C4E6.9090008@lorenso.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-ID: <200401091119.45778.t.maekitalo@epgmbh.de>
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
Hi,
>
> 2) (using information schema ... little better)
>
> SELECT table_name FROM information_schema.tables WHERE table_schema
> = 'public';
>
> or ...
>
...
I just looked at the information_schema. It is a very nice feature, but
difficult to use in psql.
I just wanted to see, what I can find here. After trying and rtfm I ended in
'\d information_schema.*'. I get a very large page wich is quite unreadable.
'\d' is normally very usable.
It would be better not to show the view-definition.
What if \d on views just show the column, type and attribute. \d+ would show
the full view-definition.
Tommi
--
Dr. Eckhardt + Partner GmbH
http://www.epgmbh.de
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
From pgsql-hackers-owner+M48946@postgresql.org Sat Jan 10 07:42:08 2004
Return-path: <pgsql-hackers-owner+M48946@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0ACg6X18515
for <pgman@candle.pha.pa.us>; Sat, 10 Jan 2004 07:42:07 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AfINd-0006bw-4f; Sat, 10 Jan 2004 06:38:17 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 35C29D1D542
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Sat, 10 Jan 2004 12:36:36 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 91943-10
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sat, 10 Jan 2004 08:36:07 -0400 (AST)
Received: from filer (c-24-6-183-218.client.comcast.net [24.6.183.218])
by svr1.postgresql.org (Postfix) with ESMTP id 4ACFBD1D54E
for <pgsql-hackers@postgresql.org>; Sat, 10 Jan 2004 08:36:03 -0400 (AST)
Received: from localhost (localhost [127.0.0.1])
(uid 1000)
by filer with local; Sat, 10 Jan 2004 04:36:06 -0800
Date: Sat, 10 Jan 2004 04:36:06 -0800
From: Kevin Brown <kevin@sysexperts.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] psql \d option list overloaded
Message-ID: <20040110123605.GA2608@filer>
Mail-Followup-To: Kevin Brown <kevin@sysexperts.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
References: <3FEE6DFB.9040408@lorenso.com> <200401040125.i041PLR14687@candle.pha.pa.us> <20040104191322.GD8524@posixnap.net> <3FF8C4E6.9090008@lorenso.com> <20040105154534.GF8524@posixnap.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
In-Reply-To: <20040105154534.GF8524@posixnap.net>
Organization: Frobozzco International
User-Agent: Mutt/1.5.4i
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.8 required=5.0 tests=BAYES_00,HTML_MESSAGE
autolearn=ham version=2.61
Status: OR
Alex J. Avriette wrote:
> On Sun, Jan 04, 2004 at 07:59:02PM -0600, D. Dante Lorenso wrote:
>
> > Anything other than simple, short commands is a waste, IMHO. I can easily
> > remember SHOW DATABASES and SHOW TABLES and DESC <table>, because they
> > reflect
> > my intensions directly and 'make sense'.
>
> What makes sense to me in csh doesn't make sense in a bourne shell.
And yet, bash has !$ and job control just like csh, even though they're
not standard Bourne-shell features.
It's not a bad thing to adopt good ideas from other projects.
> You can't expect all applications to work correctly.
You can't expect this anyway, at least when dealing with cross-database
applications. The intersection of the SQL feature sets across all the
major database engines is pretty limited -- small enough that you'll
almost certainly end up using something database-specific when attempting
to do anything truly nontrivial.
> I'd like to second
> Peter's "yep" when asked if he could remember all the various \d*
> commands. It really comes down to whether you're trying. New software
> (even though you may have been using it for a year) requires some
> adjustment.
This is true, but it's no argument against implementing "show
databases", "show tables", and "describe".
Every database engine is different, but in the case of PG it makes sense
to adopt the best methods we can find. A consistent and easy to
remember way of showing the various entities in psql (at the very least)
would be of great advantage. It's something that MySQL gets right. As
it turns out, we already have "SHOW" in psql and it's used for something
else. So we might instead use something else (e.g. "VIEW") instead.
Either way, a single command that takes as its argument the type of entity
you want to see would be extremely useful, and much easier to remember
than what we currently have -- because the names of the entities that
are available are already well-defined and are likely known to the user
already.
> > What's more important is the ability to use these commands from any
> > interface not just 'psql' client. I think 'psql' already has the slash
> > commands. No need to create NEW slash commands there...
> >
> > >If you want to find out how to show the databases in sql, use psql -E.
> > >
> > >
> > Have you actually done that? OMG!
>
> Yes, I do it frequently. You may notice a recent post of mine used
> exactly that output.
Now do it from within psql.
It's \l, as it turns out. This violates the principle of least surprise
because psql generally uses \d* to show entities.
> > 3) like MySQL does it...
> >
> > SHOW TABLES;
>
> Should postgres also support the '#' comment? What other non-sql
> sqlisms should we support?
PG already has a number of PG-specific features. Adding more,
*especially* if they happen to be compatible with other databases, isn't
going to hurt much.
No, the thing to worry about here is whether or not these commands
("SHOW", for instance) will appear in the SQL spec and will have a
completely different meaning from the meaning in PG. Also of concern is
that "SHOW" is already reserved and used for something else. We'd have
to use something other than "SHOW" for the purpose being discussed.
> > There's something to be said about the 'SHOW'and 'DESC' sql-extensions
> > added into MySQL. Newbies can really 'get' it quickly. It's what really
>
> I would argue that these are not "sql extensions" at all. If you like, I
> can go over the source to verify this myself, but my guess is that MySQL
> is doing exactly what postgres is doing, and evaluating this as a macro.
No, they are built into MySQL's backend parser. You can easily verify
this by executing these commands from within Perl or Python. They
return a table just like any other SQL command that returns data.
> Furthermore, databases are not designed for "newbies" to jump right in
> with both feet. They are designed to be robust and stable.
Now this is ludicrous. Yes, they're designed to be robust and stable,
but that has absolutely nothing to do with how easy they are to use.
> Additionally,
> some SQL compliance is nice. After that, you work on features.
If we were talking about something that went against the SQL standard
then I would agree with you. But we're talking about something that,
as far as I know, isn't in the SQL standard at all. Implementing it
won't make us noncompliant with the SQL standard any more than the
implementation of CREATE INDEX has.
> Changing the interface so that you or others don't have to read the
> documentation smacks of laziness.
Really? One could make the same argument for standards of any kind,
yes? :-)
> Somebody like Bruce, Peter, or Tom (or indeed somebody else) is going
> to waste yet more time making things like this available to somebody
> who probably won't read any of the other documentation either, and will
> wind up on irc pestering somebody like myself, Dave, or Neil. Why is
> this progress?
It's progress because it will keep those people from pestering someone
in the know about how to show the available databases, or how to
describe a table.
> > sold me on MySQL when I first learned it. For me, it's like:
> >
> > 'dir' in DOS,
> > 'ls' in Unix
> > 'SHOW' in MySQL
> > ??? in PostgreSQL ?
>
> We've been over this. It's \d*.
For listing databases it's \l. Not exactly consistent with the rest of
the related psql commands.
> > Sure, with time as my database needs grew and I matured as a developer,
> > I eventually gained more respect for PostgreSQL and have made the switch
> > even without this feature, but to this day, I really think MySQL *did it
> > right* with those extensions. You can't become a PostgreSQL guru without
> > being a newbie first. I vote we make it easier for newbies.
>
> What really frightens me here is that I know of several applications (shudder,
> "LAMP" applications) which use the output of "show tables" or other of your
> "extensions." The problem with this is precisely that it /isn't/ sql, and it
> can't be supported as a static command.
Of course not. But applications which rely on information such as that
provided by "show tables" will typically not be possible to write while
adhering to the feature intersection of all major databases anyway.
> It is intended to be there for people
> to use interactively.
Nonsense. It's there to be used. Whether it's used interactively or
not is irrelevant. The command provides useful information. But see
below.
> Making "pseudo sql" will encourage more developers to
> (and I'd apologize for this if it weren't true) code in Postgres the same
> lazy way they code in MySQL.
This is a strawman argument, although I understand your concern here.
To be honest, for application development I'd much rather see people
use information_schema, but that's only because information_schema is
in the SQL standard and as such should be the preferred way to retrieve
the information that the "SHOW" commands in MySQL return. That said,
the inclusion of information_schema is a very recent development on the
PostgreSQL side of things, and doesn't even exist on some other major
databases such as MSSQL.
Of course, a PG equivalent to MySQL's "show" would be an even more
recent development... :-)
--
Kevin Brown kevin@sysexperts.com
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
From pgsql-hackers-owner+M48947@postgresql.org Sat Jan 10 08:12:39 2004
Return-path: <pgsql-hackers-owner+M48947@postgresql.org>
Received: from hosting.commandprompt.com (216.commandprompt.com [207.173.200.216])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0ADCbX21504
for <pgman@candle.pha.pa.us>; Sat, 10 Jan 2004 08:12:38 -0500 (EST)
Received: from postgresql.org (svr1.postgresql.org [200.46.204.71])
by hosting.commandprompt.com (8.11.6/8.11.6) with ESMTP id i0AD8Gk19951;
Sat, 10 Jan 2004 05:09:17 -0800
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 7758BD1D54C
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Sat, 10 Jan 2004 13:08:00 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 02466-03
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sat, 10 Jan 2004 09:07:32 -0400 (AST)
Received: from curie.credativ.org (credativ.com [217.160.209.18])
by svr1.postgresql.org (Postfix) with ESMTP id 64975D1D54E
for <pgsql-hackers@postgresql.org>; Sat, 10 Jan 2004 09:07:28 -0400 (AST)
Received: from localhost (localhost [127.0.0.1])
by curie.credativ.org (Postfix) with ESMTP
id 765E356243; Sat, 10 Jan 2004 14:07:25 +0100 (CET)
Received: from colt.pezone.net (dsl-213-023-254-001.arcor-ip.net [213.23.254.1])
(using TLSv1 with cipher RC4-MD5 (128/128 bits))
(No client certificate requested)
by curie.credativ.org (Postfix) with ESMTP
id B98A65623C; Sat, 10 Jan 2004 14:07:24 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Kevin Brown <kevin@sysexperts.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] psql \d option list overloaded
Date: Sat, 10 Jan 2004 14:07:24 +0100
User-Agent: KMail/1.5.1
References: <3FEE6DFB.9040408@lorenso.com> <20040105154534.GF8524@posixnap.net> <20040110123605.GA2608@filer>
In-Reply-To: <20040110123605.GA2608@filer>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-ID: <200401101407.24766.peter_e@gmx.net>
X-Virus-Scanned: by AMaViS at credativ.com
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
Kevin Brown wrote:
> Every database engine is different, but in the case of PG it makes
> sense to adopt the best methods we can find. A consistent and easy
> to remember way of showing the various entities in psql (at the very
> least) would be of great advantage. It's something that MySQL gets
> right. As it turns out, we already have "SHOW" in psql and it's used
> for something else. So we might instead use something else (e.g.
> "VIEW") instead.
What is wrong with
SELECT * FROM information_schema.tables;
? If it's too much to type, put information_schema in the path. This
syntax has the advantage that you can use qualifications and other SQL
features. And you can build customized views on top of it. Does SHOW
TABLES or whatever it might be called support that?
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
From pgsql-hackers-owner+M48948@postgresql.org Sat Jan 10 11:30:24 2004
Return-path: <pgsql-hackers-owner+M48948@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0AGUMX12749
for <pgman@candle.pha.pa.us>; Sat, 10 Jan 2004 11:30:23 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AfLzP-0000hA-JY; Sat, 10 Jan 2004 10:29:31 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id A69DED1B51D
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Sat, 10 Jan 2004 16:28:00 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 14752-08
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sat, 10 Jan 2004 12:27:29 -0400 (AST)
Received: from zigo.dhs.org (as2-4-3.an.g.bonet.se [194.236.34.191])
by svr1.postgresql.org (Postfix) with ESMTP id 89156D1D560
for <pgsql-hackers@postgresql.org>; Sat, 10 Jan 2004 12:27:23 -0400 (AST)
Received: from zigo.zigo.dhs.org (zigo.zigo.dhs.org [192.168.0.1])
by zigo.dhs.org (Postfix) with ESMTP
id 9D7EF8E0D; Sat, 10 Jan 2004 17:27:21 +0100 (CET)
Date: Sat, 10 Jan 2004 17:27:21 +0100 (CET)
From: =?ISO-8859-1?Q?Dennis_Bj=F6rklund?= <db@zigo.dhs.org>
To: Peter Eisentraut <peter_e@gmx.net>
cc: Kevin Brown <kevin@sysexperts.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] psql \d option list overloaded
In-Reply-To: <200401101407.24766.peter_e@gmx.net>
Message-ID: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
On Sat, 10 Jan 2004, Peter Eisentraut wrote:
> > to remember way of showing the various entities in psql (at the very
> > least) would be of great advantage. It's something that MySQL gets
> > right. As it turns out, we already have "SHOW" in psql and it's used
> > for something else.
>
> What is wrong with
>
> SELECT * FROM information_schema.tables;
The result is very hard to read since it's so much of it (try column
instead of tables). The \xx commands do some nice formatting you don't
get from the above.
I would rather have long commands so one can write
\describe_table foo
and have the tab completion work for these of course (only for the long
commands, the \dt and such does not belong in completion).
The information schema is nice, but it's not what I want to use at the
prompt to view the content of the database.
--
/Dennis Bjrklund
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
From pgsql-hackers-owner+M48950@postgresql.org Sat Jan 10 13:30:54 2004
Return-path: <pgsql-hackers-owner+M48950@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0AIUrX25980
for <pgman@candle.pha.pa.us>; Sat, 10 Jan 2004 13:30:53 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AfNsG-0002v6-Lh; Sat, 10 Jan 2004 12:30:17 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 92952D1D56E
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Sat, 10 Jan 2004 18:28:45 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 33571-06
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sat, 10 Jan 2004 14:28:14 -0400 (AST)
Received: from smtp.istop.com (dci.doncaster.on.ca [66.11.168.194])
by svr1.postgresql.org (Postfix) with ESMTP id 9FBA4D1D572
for <pgsql-hackers@postgresql.org>; Sat, 10 Jan 2004 14:28:13 -0400 (AST)
Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162])
by smtp.istop.com (Postfix) with ESMTP
id 1CC0837658; Sat, 10 Jan 2004 13:28:09 -0500 (EST)
Received: from localhost
([127.0.0.1] helo=stark.xeocode.com ident=foobar)
by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian))
id 1AfNqD-0001y1-00; Sat, 10 Jan 2004 13:28:09 -0500
To: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] psql \d option list overloaded
References: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org>
In-Reply-To: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org>
From: Greg Stark <gsstark@mit.edu>
Organization: The Emacs Conspiracy; member since 1992
Date: 10 Jan 2004 13:28:08 -0500
Message-ID: <878ykf4q13.fsf@stark.xeocode.com>
Lines: 22
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
Dennis Bjrklund <db@zigo.dhs.org> writes:
> I would rather have long commands so one can write
>
> \describe_table foo
I would think it would be better to keep everything under a single command and
have a 1-1 correspondence to \d. Ie, just add a long form syntax following the
existing \d. \d would become just an obvious set of abbreviations.
So for example:
\describe table foo => \dt foo
\describe index foo => \di foo
\describe aggregate foo => \da foo
\describe operator foo => \do foo
...
--
greg
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
From pgsql-hackers-owner+M48952@postgresql.org Sat Jan 10 14:17:26 2004
Return-path: <pgsql-hackers-owner+M48952@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0AJHOX29152
for <pgman@candle.pha.pa.us>; Sat, 10 Jan 2004 14:17:25 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AfObD-0003wE-9N; Sat, 10 Jan 2004 13:16:43 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 27045D1B498
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Sat, 10 Jan 2004 19:15:51 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 42506-02
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sat, 10 Jan 2004 15:15:21 -0400 (AST)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by svr1.postgresql.org (Postfix) with ESMTP id 143C4D1B4C5
for <pgsql-hackers@postgresql.org>; Sat, 10 Jan 2004 15:15:20 -0400 (AST)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id i0AJFJ19011695;
Sat, 10 Jan 2004 14:15:19 -0500 (EST)
To: Greg Stark <gsstark@mit.edu>
cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] psql \d option list overloaded
In-Reply-To: <878ykf4q13.fsf@stark.xeocode.com>
References: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org> <878ykf4q13.fsf@stark.xeocode.com>
Comments: In-reply-to Greg Stark <gsstark@mit.edu>
message dated "10 Jan 2004 13:28:08 -0500"
Date: Sat, 10 Jan 2004 14:15:19 -0500
Message-ID: <11694.1073762119@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
Greg Stark <gsstark@mit.edu> writes:
> So for example:
> \describe table foo => \dt foo
> \describe index foo => \di foo
> \describe aggregate foo => \da foo
> \describe operator foo => \do foo
It doesn't seem to me that this buys much except verboseness, though.
ISTM there are three fundamental problems with \d and friends:
1. Some people have a hard time remembering the commands.
2. Some people aren't using psql.
3. psql keeps breaking across backend versions because the
needed commands change.
I don't see a lot of value in addressing just one of these problem
areas, when we could instead do something that addresses all three.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
From pgsql-hackers-owner+M48954@postgresql.org Sat Jan 10 19:19:30 2004
Return-path: <pgsql-hackers-owner+M48954@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0B0JPX16197
for <pgman@candle.pha.pa.us>; Sat, 10 Jan 2004 19:19:29 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AfTJQ-0000BC-Jg; Sat, 10 Jan 2004 18:18:40 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 17450D1B465
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Sun, 11 Jan 2004 00:17:39 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 71332-04
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sat, 10 Jan 2004 20:17:10 -0400 (AST)
Received: from lakemtao03.cox.net (lakemtao03.cox.net [68.1.17.242])
by svr1.postgresql.org (Postfix) with ESMTP id 937E9D1B461
for <pgsql-hackers@postgresql.org>; Sat, 10 Jan 2004 20:17:06 -0400 (AST)
Received: from louche.swelter.net ([68.98.183.165]) by lakemtao03.cox.net
(InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP
id <20040111001710.UTGO2192.lakemtao03.cox.net@louche.swelter.net>
for <pgsql-hackers@postgresql.org>;
Sat, 10 Jan 2004 19:17:10 -0500
Received: by louche.swelter.net (Postfix, from userid 513)
id 0B28AB; Sat, 10 Jan 2004 19:16:59 -0500 (EST)
Received: from localhost (louche.swelter.net [127.0.0.1])
by louche.swelter.net (Postfix) with ESMTP id 22CDBB
for <pgsql-hackers@postgresql.org>; Sat, 10 Jan 2004 19:16:58 -0500 (EST)
Date: Sun, 11 Jan 2004 00:16:58 +0000 (UTC)
From: Jon Jensen <jon@endpoint.com>
X-X-Sender: jon@louche.swelter.net
To: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] psql \d option list overloaded
In-Reply-To: <11694.1073762119@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.58.0401110014230.1302@louche.swelter.net>
References: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org>
<878ykf4q13.fsf@stark.xeocode.com> <11694.1073762119@sss.pgh.pa.us>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
On Sat, 10 Jan 2004, Tom Lane wrote:
> ISTM there are three fundamental problems with \d and friends:
>
> 1. Some people have a hard time remembering the commands.
> 2. Some people aren't using psql.
> 3. psql keeps breaking across backend versions because the
> needed commands change.
>
> I don't see a lot of value in addressing just one of these problem
> areas, when we could instead do something that addresses all three.
I agree, at least for #2 and #3. But I just don't understand #1. Anything
is hard to remember when you're just starting to learn it. But it's still
faster to type \? <CR> then \dt than it is to type "show tables". And
"show tables" is hard (relatively speaking) for me to remember because I'm
used to psql's way of doing things, since I mostly use it.
Jon
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
From pgsql-hackers-owner+M48955@postgresql.org Sat Jan 10 20:09:33 2004
Return-path: <pgsql-hackers-owner+M48955@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0B19WX22168
for <pgman@candle.pha.pa.us>; Sat, 10 Jan 2004 20:09:33 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AfU65-000194-6w; Sat, 10 Jan 2004 19:08:57 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id B6F12D1B528
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Sun, 11 Jan 2004 01:07:56 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 70575-10
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sat, 10 Jan 2004 21:07:28 -0400 (AST)
Received: from curie.credativ.org (credativ.com [217.160.209.18])
by svr1.postgresql.org (Postfix) with ESMTP id EA5B5D1B48B
for <pgsql-hackers@postgresql.org>; Sat, 10 Jan 2004 21:07:24 -0400 (AST)
Received: from localhost (localhost [127.0.0.1])
by curie.credativ.org (Postfix) with ESMTP
id DD86C56243; Sun, 11 Jan 2004 02:07:26 +0100 (CET)
Received: from colt.pezone.net (dsl-213-023-254-001.arcor-ip.net [213.23.254.1])
(using TLSv1 with cipher RC4-MD5 (128/128 bits))
(No client certificate requested)
by curie.credativ.org (Postfix) with ESMTP
id EA9C35623C; Sun, 11 Jan 2004 02:07:25 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>, Greg Stark <gsstark@mit.edu>
Subject: Re: [HACKERS] psql \d option list overloaded
Date: Sun, 11 Jan 2004 02:07:25 +0100
User-Agent: KMail/1.5.1
cc: pgsql-hackers@postgresql.org
References: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org> <878ykf4q13.fsf@stark.xeocode.com> <11694.1073762119@sss.pgh.pa.us>
In-Reply-To: <11694.1073762119@sss.pgh.pa.us>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-ID: <200401110207.26299.peter_e@gmx.net>
X-Virus-Scanned: by AMaViS at credativ.com
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
Tom Lane wrote:
> 2. Some people aren't using psql.
I don't see why this is an issue. People not using psql are either
using a GUI, which presumably supports plenty of "show" and "describe"
functionality, or they're writing their own program, in which case it
doesn't really matter how short or easy to remember the commands are.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
From pgsql-hackers-owner+M48956@postgresql.org Sat Jan 10 20:19:59 2004
Return-path: <pgsql-hackers-owner+M48956@postgresql.org>
Received: from hosting.commandprompt.com (216.commandprompt.com [207.173.200.216])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0B1JoX23197
for <pgman@candle.pha.pa.us>; Sat, 10 Jan 2004 20:19:56 -0500 (EST)
Received: from postgresql.org (svr1.postgresql.org [200.46.204.71])
by hosting.commandprompt.com (8.11.6/8.11.6) with ESMTP id i0B1E2k19636;
Sat, 10 Jan 2004 17:15:07 -0800
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 34FE7D1B436
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Sun, 11 Jan 2004 01:13:46 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 76096-05
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sat, 10 Jan 2004 21:13:18 -0400 (AST)
Received: from curie.credativ.org (credativ.com [217.160.209.18])
by svr1.postgresql.org (Postfix) with ESMTP id 56B90D1B430
for <pgsql-hackers@postgresql.org>; Sat, 10 Jan 2004 21:13:15 -0400 (AST)
Received: from localhost (localhost [127.0.0.1])
by curie.credativ.org (Postfix) with ESMTP
id 91B2A56243; Sun, 11 Jan 2004 02:13:18 +0100 (CET)
Received: from colt.pezone.net (dsl-213-023-254-001.arcor-ip.net [213.23.254.1])
(using TLSv1 with cipher RC4-MD5 (128/128 bits))
(No client certificate requested)
by curie.credativ.org (Postfix) with ESMTP
id 7D86F5623C; Sun, 11 Jan 2004 02:13:17 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Dennis =?iso-8859-1?q?Bj=F6rklund?= <db@zigo.dhs.org>
Subject: Re: [HACKERS] psql \d option list overloaded
Date: Sun, 11 Jan 2004 02:13:17 +0100
User-Agent: KMail/1.5.1
cc: Kevin Brown <kevin@sysexperts.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
References: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org>
In-Reply-To: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Message-ID: <200401110213.17581.peter_e@gmx.net>
X-Virus-Scanned: by AMaViS at credativ.com
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
Dennis Bjrklund wrote:
> > What is wrong with
> >
> > SELECT * FROM information_schema.tables;
>
> The result is very hard to read since it's so much of it (try column
> instead of tables). The \xx commands do some nice formatting you
> don't get from the above.
This is an interesting point to remember for those that are advocating
pushing psql's queries into the backend. psql's queries are optimized
for monospaced text screens of limited size. Unless someone else is
writing a command-line client, there would be little reuse effect,
because any given application will have different display requirements.
(Another problem with pushing psql's queries into the backend is that
much of the output that psql makes is not a single table. Sometimes
there is more than one table, or the information is in the table
footers. It'd be quite complicated to make the backend produce those
kinds of displays.)
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
From pgsql-hackers-owner+M48957@postgresql.org Sun Jan 11 04:34:27 2004
Return-path: <pgsql-hackers-owner+M48957@postgresql.org>
Received: from hosting.commandprompt.com (216.commandprompt.com [207.173.200.216])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0B9YPX11678
for <pgman@candle.pha.pa.us>; Sun, 11 Jan 2004 04:34:26 -0500 (EST)
Received: from postgresql.org (svr1.postgresql.org [200.46.204.71])
by hosting.commandprompt.com (8.11.6/8.11.6) with ESMTP id i0B9U9k04632;
Sun, 11 Jan 2004 01:31:12 -0800
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id C49AFD1D555
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Sun, 11 Jan 2004 09:29:54 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 26981-08
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sun, 11 Jan 2004 05:29:25 -0400 (AST)
Received: from zigo.dhs.org (as2-4-3.an.g.bonet.se [194.236.34.191])
by svr1.postgresql.org (Postfix) with ESMTP id A75DDD1D27D
for <pgsql-hackers@postgresql.org>; Sun, 11 Jan 2004 05:29:22 -0400 (AST)
Received: from zigo.zigo.dhs.org (zigo.zigo.dhs.org [192.168.0.1])
by zigo.dhs.org (Postfix) with ESMTP
id B8DED8E0D; Sun, 11 Jan 2004 10:29:23 +0100 (CET)
Date: Sun, 11 Jan 2004 10:29:23 +0100 (CET)
From: Dennis Bjorklund <db@zigo.dhs.org>
To: Peter Eisentraut <peter_e@gmx.net>
cc: Kevin Brown <kevin@sysexperts.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] psql \d option list overloaded
In-Reply-To: <200401110213.17581.peter_e@gmx.net>
Message-ID: <Pine.LNX.4.44.0401111012020.13405-100000@zigo.dhs.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
On Sun, 11 Jan 2004, Peter Eisentraut wrote:
> Another problem with pushing psql's queries into the backend is that
> much of the output that psql makes is not a single table. Sometimes
> there is more than one table, or the information is in the table
> footers.
Yes, pushing the \xx commands into the server makes no sense to me at all.
The commands in psql are very specific for psql. I don't see why you ever
want to do SHOW TABLES except at the command line in psql. If your
application wants to find all tables in the database, then we have the
standard sql way, which is the information schema.
The argument that "show tables" is easier to remember then \dt might be
true, but to me that just means that we should make psql better by adding
\describe_table and such, not to push psql code into the server.
Making a couple of views that are pg specific to make it easier to get
information out could be good however. The information schema does not
always contain all information one might want. Making specialised SQL
commands for it I'm not in favor of at all.
--
/Dennis Bjrklund
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
From pgsql-hackers-owner+M48965@postgresql.org Sun Jan 11 12:20:30 2004
Return-path: <pgsql-hackers-owner+M48965@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0BHKTX05825
for <pgman@candle.pha.pa.us>; Sun, 11 Jan 2004 12:20:29 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AfjFg-00073z-AN; Sun, 11 Jan 2004 11:19:52 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 46DAED1B4AD
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Sun, 11 Jan 2004 17:18:57 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 77771-03
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sun, 11 Jan 2004 13:18:26 -0400 (AST)
Received: from sss.pgh.pa.us (unknown [192.204.191.242])
by svr1.postgresql.org (Postfix) with ESMTP id 4F237D1B51D
for <pgsql-hackers@postgresql.org>; Sun, 11 Jan 2004 13:18:25 -0400 (AST)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id i0BHI519016986;
Sun, 11 Jan 2004 12:18:05 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Greg Stark <gsstark@mit.edu>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] psql \d option list overloaded
In-Reply-To: <200401110207.26299.peter_e@gmx.net>
References: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org> <878ykf4q13.fsf@stark.xeocode.com> <11694.1073762119@sss.pgh.pa.us> <200401110207.26299.peter_e@gmx.net>
Comments: In-reply-to Peter Eisentraut <peter_e@gmx.net>
message dated "Sun, 11 Jan 2004 02:07:25 +0100"
Date: Sun, 11 Jan 2004 12:18:05 -0500
Message-ID: <16985.1073841485@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane wrote:
>> 2. Some people aren't using psql.
> I don't see why this is an issue. People not using psql are either
> using a GUI, which presumably supports plenty of "show" and "describe"
> functionality, or they're writing their own program, in which case it
> doesn't really matter how short or easy to remember the commands are.
But this interacts with point 3 (psql breaks on every new backend
version). It's not desirable to have every GUI and large custom program
implementing its own set of metadata inquiry commands: they all have
to go through the same update pain as psql. Perhaps if people start to
rely on information_schema for those things, life will get better,
but I'm unconvinced that will happen. psql itself certainly hasn't
moved in that direction.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
From pgsql-hackers-owner+M48981@postgresql.org Sun Jan 11 20:52:09 2004
Return-path: <pgsql-hackers-owner+M48981@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0C1q8X05166
for <pgman@candle.pha.pa.us>; Sun, 11 Jan 2004 20:52:09 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1AfrF5-0005Pj-Aq; Sun, 11 Jan 2004 19:51:47 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 654B2D1B519
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Mon, 12 Jan 2004 01:50:40 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 57929-03
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Sun, 11 Jan 2004 21:50:12 -0400 (AST)
Received: from lakemtao04.cox.net (lakemtao04.cox.net [68.1.17.241])
by svr1.postgresql.org (Postfix) with ESMTP id DD464D1D576
for <pgsql-hackers@postgresql.org>; Sun, 11 Jan 2004 21:50:07 -0400 (AST)
Received: from [192.168.0.13] ([68.105.168.121]) by lakemtao04.cox.net
(InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP
id <20040112015012.MDVR19895.lakemtao04.cox.net@[192.168.0.13]>;
Sun, 11 Jan 2004 20:50:12 -0500
From: Robert Treat <xzilla@users.sourceforge.net>
To: Jon Jensen <jon@endpoint.com>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] psql \d option list overloaded
Date: Sun, 11 Jan 2004 20:50:08 -0500
User-Agent: KMail/1.5
References: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org> <11694.1073762119@sss.pgh.pa.us> <Pine.LNX.4.58.0401110014230.1302@louche.swelter.net>
In-Reply-To: <Pine.LNX.4.58.0401110014230.1302@louche.swelter.net>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-ID: <200401112050.09142.xzilla@users.sourceforge.net>
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
On Saturday 10 January 2004 19:16, Jon Jensen wrote:
> On Sat, 10 Jan 2004, Tom Lane wrote:
> > ISTM there are three fundamental problems with \d and friends:
> >
> > 1. Some people have a hard time remembering the commands.
> > 2. Some people aren't using psql.
> > 3. psql keeps breaking across backend versions because the
> > needed commands change.
> >
> > I don't see a lot of value in addressing just one of these problem
> > areas, when we could instead do something that addresses all three.
>
> I agree, at least for #2 and #3. But I just don't understand #1. Anything
> is hard to remember when you're just starting to learn it. But it's still
> faster to type \? <CR> then \dt than it is to type "show tables". And
> "show tables" is hard (relatively speaking) for me to remember because I'm
> used to psql's way of doing things, since I mostly use it.
>
I'd second this point; I've certainly stumbled over the "show" syntax when
trying to get anything other than tables in mysql.
Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
From pgsql-hackers-owner+M48993@postgresql.org Mon Jan 12 12:50:40 2004
Return-path: <pgsql-hackers-owner+M48993@postgresql.org>
Received: from noon.pghoster.com (noon.pghoster.com [64.246.0.64])
by candle.pha.pa.us (8.11.6/8.11.6) with ESMTP id i0CHocX04973
for <pgman@candle.pha.pa.us>; Mon, 12 Jan 2004 12:50:39 -0500 (EST)
Received: from svr1.postgresql.org ([200.46.204.71] helo=postgresql.org)
by noon.pghoster.com with esmtp (Exim 4.24)
id 1Ag6Ck-0008V2-E5; Mon, 12 Jan 2004 11:50:22 -0600
X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org
Received: from localhost (neptune.hub.org [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id ED886D1D17D
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>; Mon, 12 Jan 2004 17:49:16 +0000 (GMT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 17616-05
for <pgsql-hackers-postgresql.org@localhost.postgresql.org>;
Mon, 12 Jan 2004 13:48:46 -0400 (AST)
Received: from curie.credativ.org (credativ.com [217.160.209.18])
by svr1.postgresql.org (Postfix) with ESMTP id 09691D1B467
for <pgsql-hackers@postgresql.org>; Mon, 12 Jan 2004 13:48:45 -0400 (AST)
Received: from localhost (localhost [127.0.0.1])
by curie.credativ.org (Postfix) with ESMTP
id 45CA05626B; Mon, 12 Jan 2004 18:48:44 +0100 (CET)
Received: from colt.pezone.net (dsl-213-023-254-001.arcor-ip.net [213.23.254.1])
(using TLSv1 with cipher RC4-MD5 (128/128 bits))
(No client certificate requested)
by curie.credativ.org (Postfix) with ESMTP
id 2F90D5623C; Mon, 12 Jan 2004 18:48:43 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [HACKERS] psql \d option list overloaded
Date: Mon, 12 Jan 2004 18:48:43 +0100
User-Agent: KMail/1.5.1
cc: Greg Stark <gsstark@mit.edu>, pgsql-hackers@postgresql.org
References: <Pine.LNX.4.44.0401101720500.13405-100000@zigo.dhs.org> <200401110207.26299.peter_e@gmx.net> <16985.1073841485@sss.pgh.pa.us>
In-Reply-To: <16985.1073841485@sss.pgh.pa.us>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-ID: <200401121848.43765.peter_e@gmx.net>
X-Virus-Scanned: by AMaViS at credativ.com
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Mailing-List: pgsql-hackers
Precedence: bulk
Sender: pgsql-hackers-owner@postgresql.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - noon.pghoster.com
X-AntiAbuse: Original Domain - candle.pha.pa.us
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - postgresql.org
X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on
candle.pha.pa.us
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.61
Status: OR
Tom Lane wrote:
> But this interacts with point 3 (psql breaks on every new backend
> version). It's not desirable to have every GUI and large custom
> program implementing its own set of metadata inquiry commands: they
> all have to go through the same update pain as psql. Perhaps if
> people start to rely on information_schema for those things, life
> will get better, but I'm unconvinced that will happen. psql itself
> certainly hasn't moved in that direction.
IIRC, the two killers in psql compatibility have been outer joins and
schemas. I don't see how we could have avoided that, except with
highly specialized and static (parameter-less) commands. There have
been additional minor issues, but I suppose we could have avoided those
if we had cared to do so at all.
Several people have in the past proposed to keep psql backward
compatible, even if only by means of
if (version =x) {
...
}
else if (version = y) {
...
}
(which would be fine by me), but apparently no one has felt pressed
enough yet.
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment