Thread

  1. Run Time Variables

    Phil Hayward <phil@springfield.uklinux.net> — 2001-03-10T18:37:39Z

    Can anyone assist please?
    In Oracle it is possible to enter variables at run time with a query as follows
    
    SELECT name, salary, dept
    FROM emp
    WHERE empid = &empid;
    
    On running the query you will be prompted .....
    
    Enter value for empid:
    
    Is there an equivalent feature in PostgreSql, Psql ?
    
    
    -- 
    Phil Hayward
    London, England
    
    phil@springfield.co.nz
    phil@springfield.uklinux.net
    
    
  2. add primary key

    mikhail malamud <mikhail.malamud@drexel.edu> — 2001-03-11T03:55:11Z

    ALTER TABLE Activity add
    	CONSTRAINT  PRIMARY KEY
    	(
    		ActivityId
    	)
    What's wrong with this. How do I add primary key constraint.
    I tried to look in the docs but I could not find the answer, can anyone
    also point me to a place where I could find an answer to this question
    without disturbing the entire mailing list with such a probably simple
    question.
    
    
    
  3. Re: Run Time Variables

    Anthony E . Greene <agreene@pobox.com> — 2001-03-11T13:57:19Z

    On Sat, 10 Mar 2001 13:37:39 Phil Hayward wrote:
    >Can anyone assist please?
    >In Oracle it is possible to enter variables at run time with a query as
    >follows
    >
    >SELECT name, salary, dept
    >FROM emp
    >WHERE empid = &empid;
    >
    >On running the query you will be prompted .....
    >
    >Enter value for empid:
    >
    >Is there an equivalent feature in PostgreSql, Psql ?
    
    In pgaccess you can create a query that looks like this:
    
      select name, salary, dept 
      from emp 
      where emp_id = '[parameter "Employee ID?"]' 
    
    A dialog box will prompt you for input. I don't know of a way to do this
    within psql.
    
    Tony
    -- 
    Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/>
    PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
    Chat:  AOL/Yahoo: TonyG05    ICQ: 91183266
    Linux. The choice of a GNU Generation. <http://www.linux.org/>
    
    
  4. RE: add primary key

    mikhail malamud <mikhail.malamud@drexel.edu> — 2001-03-13T02:13:03Z

    Can someone please tell me the answer to this simple question?
    
    -----Original Message-----
    From: pgsql-novice-owner@postgresql.org
    [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of mikhail malamud
    Sent: Saturday, March 10, 2001 10:55 PM
    To: pgsql-novice@postgresql.org
    Subject: [NOVICE] add primary key
    
    
    ALTER TABLE Activity add
    	CONSTRAINT  PRIMARY KEY
    	(
    		ActivityId
    	)
    What's wrong with this. How do I add primary key constraint.
    I tried to look in the docs but I could not find the answer, can anyone
    also point me to a place where I could find an answer to this question
    without disturbing the entire mailing list with such a probably simple
    question.
    
    
    ---------------------------(end of broadcast)---------------------------
    TIP 5: Have you checked our extensive FAQ?
    
    http://www.postgresql.org/users-lounge/docs/faq.html
    
    
    
  5. RE: add primary key

    mikhail malamud <mikhail.malamud@drexel.edu> — 2001-03-13T16:41:28Z

    I ve been trying to find an answer to this question but all in vain. Can
    someone pleease help me. How do you add a primary key constraint to an
    existing table.
    
    
    
    -----Original Message-----
    From: pgsql-novice-owner@postgresql.org
    [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of mikhail malamud
    Sent: Saturday, March 10, 2001 10:55 PM
    To: pgsql-novice@postgresql.org
    Subject: [NOVICE] add primary key
    
    
    ALTER TABLE Activity add
    	CONSTRAINT  PRIMARY KEY
    	(
    		ActivityId
    	)
    What's wrong with this. How do I add primary key constraint.
    I tried to look in the docs but I could not find the answer, can anyone
    also point me to a place where I could find an answer to this question
    without disturbing the entire mailing list with such a probably simple
    question.
    
    
    ---------------------------(end of broadcast)---------------------------
    TIP 5: Have you checked our extensive FAQ?
    
    http://www.postgresql.org/users-lounge/docs/faq.html
    
    
    ---------------------------(end of broadcast)---------------------------
    TIP 3: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to majordomo@postgresql.org so that your
    message can get through to the mailing list cleanly
    
    
    
  6. Re: add primary key

    lee johnson <lee@imyourhandiman.com> — 2001-03-15T22:46:13Z

    just wondering if converting msaccess databases ( will forms/reports tables all convert?)
    
    into pgaccess via pgadmin in windows work or is this a nightmare to
    setup/do..
    
    thanks
    lee