[ADMIN] text & char(32)

2000-09-19 Thread Vladimir V. Zolotych

  Hi all,
Can you help me a bit ?
The question is: how can I compare TEXT and CHAR(32) types ?
More detailed description:
  my=> create table foo (tt text, cc char(32));

  CREATE
  my=> insert into foo values ('aa', 'ab');

  INSERT 27476810 1
  my=> insert into foo values ('aa', 'aa');

  INSERT 27476811 1
  my=> select * from foo where tt=cc;

  tt|cc
  --+--
  (0 rows)
So the operator '=' doesn't work as I expected.
Any help will be appreciated.

-- 
Best regards,
 Vladimir  mailto:[EMAIL PROTECTED]





Re: [ADMIN] text & char(32)

2000-09-19 Thread Herbert Ambos

On Tue, 19 Sep 2000, Vladimir V. Zolotych wrote:

>   Hi all,
> Can you help me a bit ?
> The question is: how can I compare TEXT and CHAR(32) types ?
> More detailed description:
>   my=> create table foo (tt text, cc char(32));
> 
>   CREATE
>   my=> insert into foo values ('aa', 'ab');
> 
>   INSERT 27476810 1
>   my=> insert into foo values ('aa', 'aa');
> 
>   INSERT 27476811 1
>   my=> select * from foo where tt=cc;
> 
>   tt|cc
>   --+--
>   (0 rows)
> So the operator '=' doesn't work as I expected.
> Any help will be appreciated.
> 
> 

try

select * from foo where tt=trim(cc);



herbert




Re: [ADMIN] text & char(32)

2000-09-19 Thread Karel Zak


On Tue, 19 Sep 2000, Vladimir V. Zolotych wrote:

>   Hi all,
> Can you help me a bit ?
> The question is: how can I compare TEXT and CHAR(32) types ?
> More detailed description:
>   my=> create table foo (tt text, cc char(32));
> 
>   CREATE
>   my=> insert into foo values ('aa', 'ab');
> 
>   INSERT 27476810 1
>   my=> insert into foo values ('aa', 'aa');
> 
>   INSERT 27476811 1
>   my=> select * from foo where tt=cc;
> 
>   tt|cc
>   --+--
>   (0 rows)

 Because you not compare 'aa' and 'aa' but

'aa' and 'aa'
  ^^
   32 chars

 try:

 test=# select * from foo where tt::char = cc;
 tt |cc
+--
 aa | aa
(1 row)

 Better is use varchar(32) for 'cc' if you want run this (tt=cc) query 
often.
  
Karel




[ADMIN] DENY database access to others than owner

2000-09-19 Thread Jan-Hendrik Benter


Hi there,

does anybody know how I can prevent that users which don't own a database
can connect to that database and can create tables in that very database.


Best regards,

Jan-Hendrik Benter


-- 

#--->
#
#   contact me by
#   mail: [EMAIL PROTECTED]   
#   icq: 19651088  aim: JaniBe   
#   or visit www.schoolhelp.de   
#
#->





Re: [ADMIN] text & char(32)

2000-09-19 Thread bangh

If your define your table using varchar(32), instead of char(32), your
query will work fine.


--
banghe

Herbert Ambos wrote:

> On Tue, 19 Sep 2000, Vladimir V. Zolotych wrote:
>
> >   Hi all,
> > Can you help me a bit ?
> > The question is: how can I compare TEXT and CHAR(32) types ?
> > More detailed description:
> >   my=> create table foo (tt text, cc char(32));
> >
> >   CREATE
> >   my=> insert into foo values ('aa', 'ab');
> >
> >   INSERT 27476810 1
> >   my=> insert into foo values ('aa', 'aa');
> >
> >   INSERT 27476811 1
> >   my=> select * from foo where tt=cc;
> >
> >   tt|cc
> >   --+--
> >   (0 rows)
> > So the operator '=' doesn't work as I expected.
> > Any help will be appreciated.
> >
> >
>
> try
>
> select * from foo where tt=trim(cc);
>
> herbert




[ADMIN] NOTICE: CREATE TABLE/FOREIGN KEY clause ignored; not yet implemented

2000-09-19 Thread vijayendra mohan agrawal

Hi all,

I have used FOREIGN KEYs in some of my tables, while creating those tables,
notice message comes :
"NOTICE:  CREATE TABLE/FOREIGN KEY clause ignored; not yet implemented"

Please tell me what to do, because I have to use the referential integrity.

Thank You,
Best Regards,
Vijay


Vijayendra Mohan Agrawal
Wipro Technologies
26, Hosur Main Road, Bommanhalli,
Bangalore-560068, India
Tel: 91-80-5722296 Extn:3076
Fax: 91-80-5722696
E-mail : [EMAIL PROTECTED]
**




Re: [ADMIN] NOTICE: CREATE TABLE/FOREIGN KEY clause ignored; not yet implemented

2000-09-19 Thread Gavin M. Roy

Make sure you're using PostgresQL 7.0 or greater.

Cheers,

Gavin

vijayendra mohan agrawal wrote:

> Hi all,
>
> I have used FOREIGN KEYs in some of my tables, while creating those tables,
> notice message comes :
> "NOTICE:  CREATE TABLE/FOREIGN KEY clause ignored; not yet implemented"
>
> Please tell me what to do, because I have to use the referential integrity.
>
> Thank You,
> Best Regards,
> Vijay
>
> 
> Vijayendra Mohan Agrawal
> Wipro Technologies
> 26, Hosur Main Road, Bommanhalli,
> Bangalore-560068, India
> Tel: 91-80-5722296 Extn:3076
> Fax: 91-80-5722696
> E-mail : [EMAIL PROTECTED]
> **