Thread: Display SELECT

Display SELECT

From
eric manceau
Date:
Hello there,

I cannot retrieve the result of a SELECT query on the PSQL
monitor but nothing seems wrong :

com=# \d iden
 Table "iden"
 Attribute | Type | Modifier
-----------+-----------------------+----------
 name | character varying(20) |
 tel | integer |

com=# INSERT INTO iden VALUES ('germain',5689);
INSERT 18844 1
com=# SELECT * FROM iden
com-#

I use postgresql 7.1.3 on a redhat 7.2.

Thank you for any hint.
_________________________________________________________
Gagne une PS2 ! Envoie un SMS avec le code PS au 61166
(0,35€ Hors coût du SMS)


Re: Display SELECT

From
Ludwig Lim
Date:
--- eric manceau <eric.manceau@caramail.com> wrote:
> Hello there,
>
> I cannot retrieve the result of a SELECT query on
> the PSQL
> monitor but nothing seems wrong :
>
> com=# \d iden
>  Table "iden"
>  Attribute | Type | Modifier
> -----------+-----------------------+----------
>  name | character varying(20) |
>  tel | integer |
>
> com=# INSERT INTO iden VALUES ('germain',5689);
> INSERT 18844 1
> com=# SELECT * FROM iden
> com-#
>
 You forgot to put a semi-colon after the SELECT
statement.

regards,
ludwig.

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

Re: Display SELECT

From
"Devinder K Rajput"
Date:
you are missing the ending semicolon that is needed to complete the select
statement.   The reason I noticed this is because your prompt changed from
"com=#" to "com-#" (notice the change from = to -), meaning psql is waiting
for the rest of command, a semicolon, in your case.

regards,

Devinder Rajput
Stores Division Corporate Offices
Chicago, IL
(773) 442-6474



    
                    "eric manceau"
    
                    <eric.manceau@caramail.       To:     pgsql-novice@postgresql.org
    
                    com>                          cc:
    
                    Sent by:                      Subject:     [NOVICE] Display SELECT
    
                    pgsql-novice-owner@post
    
                    gresql.org
    

    

    
                    10/23/2002 12:55 PM
    

    

    




Hello there,

I cannot retrieve the result of a SELECT query on the PSQL
monitor but nothing seems wrong :

com=# \d iden
 Table "iden"
 Attribute | Type | Modifier
-----------+-----------------------+----------
 name | character varying(20) |
 tel | integer |

com=# INSERT INTO iden VALUES ('germain',5689);
INSERT 18844 1
com=# SELECT * FROM iden
com-#

I use postgresql 7.1.3 on a redhat 7.2.

Thank you for any hint.
_________________________________________________________
Gagne une PS2 ! Envoie un SMS avec le code PS au 61166
(0,35€ Hors coût du SMS)


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org






Re: Display SELECT

From
HK
Date:
hi,
    Also if u want to avoid placing ; at end of each line, try
starting psql with -S option (single line). Here the newline terminates
the query rather that ;.
Also note the changed prompt.

regards,
hari

 On Wed, 23 Oct 2002, Ludwig Lim wrote:

>
> --- eric manceau <eric.manceau@caramail.com> wrote:
> > Hello there,
> >
> > I cannot retrieve the result of a SELECT query on
> > the PSQL
> > monitor but nothing seems wrong :
> >
> > com=# \d iden
> >  Table "iden"
> >  Attribute | Type | Modifier
> > -----------+-----------------------+----------
> >  name | character varying(20) |
> >  tel | integer |
> >
> > com=# INSERT INTO iden VALUES ('germain',5689);
> > INSERT 18844 1
> > com=# SELECT * FROM iden
> > com-#
> >
>  You forgot to put a semi-colon after the SELECT
> statement.
>
> regards,
> ludwig.
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>