pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem
4+ messages / 3 participants
[nested] [flat]

* Problem
@ 1998-11-19 22:32 Hitesh Kumar Gulati <hkg@plasma.ernet.in>
  1998-11-24 14:11 ` Re: Problem Hitesh Kumar Gulati <hkg@plasma.ernet.in>
  0 siblings, 1 reply; 4+ messages in thread

From: Hitesh Kumar Gulati @ 1998-11-19 22:32 UTC (permalink / raw)
  To: pgsql-sql

How to update a particular element of a field of data type array .
I am using update and set combined statement .It is accepting but it is
not displaying with select statement.
--  create table test(
                          shotno      int4 not null,
                          data        int2[],
                          constraint chk_shot check(shotno >= 0)
                       );
     update test set data[1]= %d where shotno=2929;
    

					Hitesh kumar Gulati 
					E-mail-:hkg@plasma.ernet.in
					Ph. (079)-2864023 (O)
					Engineer - SC
					Institute For Plasma Research
					Near Indira Bridge
					Bhat Gandhinagar(GUJARAT)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problem
  1998-11-19 22:32 Problem Hitesh Kumar Gulati <hkg@plasma.ernet.in>
@ 1998-11-24 14:11 ` Hitesh Kumar Gulati <hkg@plasma.ernet.in>
  0 siblings, 0 replies; 4+ messages in thread

From: Hitesh Kumar Gulati @ 1998-11-24 14:11 UTC (permalink / raw)
  To: pgsql-sql

How to update a particular element of a field of data type array .
 I am using update and set combined statement .It is accepting but it is
 not displaying with select statement.
       create table test(
>                           shotno      int4 not null,
>                           data        int2[],
>                           constraint chk_shot check(shotno >= 0)
>                        );
>      update test set data[1]= %d where shotno=2929;
>                                         Hitesh kumar Gulati
>                                         hkg@plasma.ernet.in
>                                         
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* [LONGINT] Problem
@ 2001-10-25 18:25 Alexey Prohorenko <green@usa.dp.ua>
  2001-10-25 23:50 ` Re: [LONGINT] Problem Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Alexey Prohorenko @ 2001-10-25 18:25 UTC (permalink / raw)
  To: pgsql-sql; pgsql-general@postgresql.org

		Hi, Guys,

	I am new to PostgreSQL -- (I am migrating from MySQL), so I have
	some, may be "stupid", but still interesting questions. 
	Interesting for me. :-)

	In MySQL there was type called INT UNSIGNED, where I used
	to keep values from 1 to 4294967295 without any problems.
	1 is '00000000000000000000000000000001' in binary, and
	4294967295 is '11111111111111111111111111111111'.

	I also was able to do f.e. 'SELECT xxx WHERE (xxx & 2147483648)'
	and get everything I want.
	2147483648 is '10000000000000000000000000000000' in binary.

	Nevertheless, with PostgreSQL I have troubles. I didn't find
	any type which will help me to do everything above mentioned.

	May be someone of you was in the same situation, or has enough
	knowledge to help me with that?

	I'll be very gladfull for any answer,
	Looking forward them.

	Thanks.

	P.S. If possible -- do CC: green@usa.dp.ua when answering, cause
	I am not sure does Majordomo subscribe me or not. :-)

-- 
green
[http://www.extrasy.net] 



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [LONGINT] Problem
  2001-10-25 18:25 [LONGINT] Problem Alexey Prohorenko <green@usa.dp.ua>
@ 2001-10-25 23:50 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Stephan Szabo @ 2001-10-25 23:50 UTC (permalink / raw)
  To: Alexey Prohorenko <green@usa.dp.ua>; +Cc: pgsql-sql

On Thu, 25 Oct 2001, Alexey Prohorenko wrote:

> 	I am new to PostgreSQL -- (I am migrating from MySQL), so I have
> 	some, may be "stupid", but still interesting questions. 
> 	Interesting for me. :-)
> 
> 	In MySQL there was type called INT UNSIGNED, where I used
> 	to keep values from 1 to 4294967295 without any problems.
> 	1 is '00000000000000000000000000000001' in binary, and
> 	4294967295 is '11111111111111111111111111111111'.
> 
> 	I also was able to do f.e. 'SELECT xxx WHERE (xxx & 2147483648)'
> 	and get everything I want.
> 	2147483648 is '10000000000000000000000000000000' in binary.
> 
> 	Nevertheless, with PostgreSQL I have troubles. I didn't find
> 	any type which will help me to do everything above mentioned.
> 
> 	May be someone of you was in the same situation, or has enough
> 	knowledge to help me with that?

I think all of the postgres types are signed. An int8 will store the
values (at the cost of alot of extra bits).  I think if you were
willing to do a little coding you'd probably be able to make a 
uint4 type (but I don't know what'd be involved in actually doing that)





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2001-10-25 23:50 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-11-19 22:32 Problem Hitesh Kumar Gulati <hkg@plasma.ernet.in>
1998-11-24 14:11 ` Hitesh Kumar Gulati <hkg@plasma.ernet.in>
2001-10-25 18:25 [LONGINT] Problem Alexey Prohorenko <green@usa.dp.ua>
2001-10-25 23:50 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox