Thread: default value in varchar column in 1.3.82-dev
Hi When I try to change the default value (after the table is created) of a varchar column to ffffff - without quotes I get the following error: "Run-time error '-2147467259 (80004005)' ERROR: Attribute 'ffffff' not found. And PgAdmin closes itself down :( But if I quote the value 'ffffff' it works fine. Shouldn't varchar columns automatically be quoted? I'm using PostgreSQL 7.3 beta2 Poul L. Christiansen Dynamic Paper PS: having the ALTER TABLE DROP COLUMN function is great! :))
Hi Poul, No, varchar defaults should not be quoted automatically, because you might be entering: CURRENT_USER Or my_func() Both of which would fail with quotes. Regards, Dave. > -----Original Message----- > From: Poul L. Christiansen [mailto:poulc@cs.auc.dk] > Sent: 02 October 2002 11:35 > To: pgadmin-hackers@postgresql.org > Subject: [pgadmin-hackers] default value in varchar column in > 1.3.82-dev > > > Hi > > When I try to change the default value (after the table is > created) of a > varchar column to ffffff - without quotes I get the following > error: "Run-time error '-2147467259 (80004005)' > ERROR: Attribute 'ffffff' not found. > > And PgAdmin closes itself down :( > > But if I quote the value 'ffffff' it works fine. > > Shouldn't varchar columns automatically be quoted? > > I'm using PostgreSQL 7.3 beta2 > > Poul L. Christiansen > Dynamic Paper > > PS: having the ALTER TABLE DROP COLUMN function is great! :)) > > > ---------------------------(end of > broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > http://www.postgresql.org/users-lounge/docs/faq.html
Ok, I see. But if I would enter an unquoted string PgAdminII shuts down. Instead of PgAdminII shutting down, shouldn't I recieve a cute little message saying that I should quote my strings :) Regards, Poul L. Christiansen Dynamic Paper Dave Page wrote: >Hi Poul, > >No, varchar defaults should not be quoted automatically, because you >might be entering: > >CURRENT_USER > >Or > >my_func() > >Both of which would fail with quotes. > >Regards, Dave. > > > >>-----Original Message----- >>From: Poul L. Christiansen [mailto:poulc@cs.auc.dk] >>Sent: 02 October 2002 11:35 >>To: pgadmin-hackers@postgresql.org >>Subject: [pgadmin-hackers] default value in varchar column in >>1.3.82-dev >> >> >>Hi >> >>When I try to change the default value (after the table is >>created) of a >>varchar column to ffffff - without quotes I get the following >>error: "Run-time error '-2147467259 (80004005)' >>ERROR: Attribute 'ffffff' not found. >> >>And PgAdmin closes itself down :( >> >>But if I quote the value 'ffffff' it works fine. >> >>Shouldn't varchar columns automatically be quoted? >> >>I'm using PostgreSQL 7.3 beta2 >> >>Poul L. Christiansen >>Dynamic Paper >> >>PS: having the ALTER TABLE DROP COLUMN function is great! :)) >> >> >>---------------------------(end of >>broadcast)--------------------------- >>TIP 5: Have you checked our extensive FAQ? >> >> >> >http://www.postgresql.org/users-lounge/docs/faq.html > >---------------------------(end of broadcast)--------------------------- >TIP 6: Have you searched our list archives? > >http://archives.postgresql.org > >
> -----Original Message----- > From: Poul L. Christiansen [mailto:poulc@cs.auc.dk] > Sent: 02 October 2002 13:36 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] default value in varchar > column in 1.3.82-dev > > > Ok, I see. > > But if I would enter an unquoted string PgAdminII shuts down. > > Instead of PgAdminII shutting down, shouldn't I recieve a cute little > message saying that I should quote my strings :) Ahh, it shouldn't close down. I didn't notice that part of your message. I'll look into it. Regards, Dave.