Thread

  1. temporary table

    jack <datactrl@tpg.com.au> — 2001-10-26T05:05:18Z

    HI, all
    
    Temporary tables created by "CREATE TABLE" or by "SELECT ..INTO" are so hard
    to handle. If it doesn't exist, then "drop" cuases an error. If the same
    procedure runs second time without dropping all temporary tables, providing
    still in the same connection session, then procedure causes "table exists"
    error. And it's unable to search system table to find whether it exists or
    not. Is that possible to have a command like "drop table if exist"? Please
    provide advices, thank you!
    
    
    JACK
    
    
    
    
    
    
  2. Re: temporary table

    Andrew Snow <andrew@modulus.org> — 2001-10-26T05:48:05Z

    How about using the procedure only within a transaction - if something goes
    wrong, the transaction can be aborted and all temporary tables will vanish,
    meaning you can start a new transaction and call the procedure again without
    worrying whether the temp tables exist.
    
    - Andrew
    
    
    On Fri, 26 Oct 2001, jack wrote:
    
    > HI, all
    >
    > Temporary tables created by "CREATE TABLE" or by "SELECT ..INTO" are so hard
    > to handle. If it doesn't exist, then "drop" cuases an error. If the same
    > procedure runs second time without dropping all temporary tables, providing
    > still in the same connection session, then procedure causes "table exists"
    > error. And it's unable to search system table to find whether it exists or
    > not. Is that possible to have a command like "drop table if exist"? Please
    > provide advices, thank you!
    >
    >
    > JACK
    >
    >
    >
    >
    >
    > ---------------------------(end of broadcast)---------------------------
    > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
    >
    
    
    
  3. Directory Names????

    Stephan Bergmann <sb@ows.es> — 2001-10-26T06:24:24Z

    Hi all!
    
    I've got one simple(?) question:
    as PostgreSQL doesn't use the name of a database as directory name on
    the hard disk (so does MySQL for example), how do I know, which database
    is directory "18719" or "18750" in the directory ./pgsql/data/base?
    
    Thanx in advance.
    
    Greetings from Spain
    Steve
    
    
    
  4. Re: Directory Names????

    Stephan Szabo <sszabo@megazone23.bigpanda.com> — 2001-10-26T14:37:55Z

    On Fri, 26 Oct 2001, Stephan Bergmann wrote:
    
    > Hi all!
    > 
    > I've got one simple(?) question:
    > as PostgreSQL doesn't use the name of a database as directory name on
    > the hard disk (so does MySQL for example), how do I know, which database
    > is directory "18719" or "18750" in the directory ./pgsql/data/base?
    
    Check out oid2name in contrib.
     
    
    
    
  5. Re: Directory Names????

    bpalmer <bpalmer@crimelabs.net> — 2001-10-28T13:40:55Z

    > I've got one simple(?) question:
    > as PostgreSQL doesn't use the name of a database as directory name on
    > the hard disk (so does MySQL for example), how do I know, which database
    > is directory "18719" or "18750" in the directory ./pgsql/data/base?
    
    Take a look at contrib/oid2name
    
    - Brandon
    
    ----------------------------------------------------------------------------
     c: 646-456-5455                                            h: 201-798-4983
     b. palmer,  bpalmer@crimelabs.net           pgp:crimelabs.net/bpalmer.pgp5