Re: [GENERAL] 21 bit number for sequence

2006-04-15 Thread Martijn van Oosterhout
On Sat, Apr 15, 2006 at 10:24:59AM +0500, Shoaib Mir wrote:
> Right now Sequence by default uses bigint which supports upto 19bit numbers
> but I want to use a 21bit that can be supported by NUMERIC datatype. Is
> there any way I can sepcify while creating a sequence what datatype to use
> or if I can specify to create sequence with numeric datatype?

What do you mean by 19bit? Normal ints support upto 31 bits and bigints
upto 2^63 positive numbers.

Maybe you mean 19 *digit* numbers, which is about what a bigint can do.
Well, that's more numbers than you're ever likely to generate so that
question become: why do you need a sequence with that kind of range?

Have a nice day,
-- 
Martijn van Oosterhout  http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.


signature.asc
Description: Digital signature


Re: [GENERAL] 21 bit number for sequence

2006-04-15 Thread Shoaib Mir
Actually what i want to do is store 10010 as the maximum value in sequence. Is there a way for it ?Thanks,ShoaibOn 4/15/06, Martijn van Oosterhout
  wrote:On Sat, Apr 15, 2006 at 10:24:59AM +0500, Shoaib Mir wrote:
> Right now Sequence by default uses bigint which supports upto 19bit numbers> but I want to use a 21bit that can be supported by NUMERIC datatype. Is> there any way I can sepcify while creating a sequence what datatype to use
> or if I can specify to create sequence with numeric datatype?What do you mean by 19bit? Normal ints support upto 31 bits and bigintsupto 2^63 positive numbers.Maybe you mean 19 *digit* numbers, which is about what a bigint can do.
Well, that's more numbers than you're ever likely to generate so thatquestion become: why do you need a sequence with that kind of range?Have a nice day,--Martijn van Oosterhout   <
kleptog@svana.org>   http://svana.org/kleptog/> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFEQKWlIB7bNG8LQkwRAtp7AJ9365tVEPUqlS8Uks2RpoKebe6vyQCfcWSJh+6EyHJOjWa4QIoFRxtu+SQ=
=Jpg3-END PGP SIGNATURE-


Re: [GENERAL] 21 bit number for sequence

2006-04-15 Thread Martijn van Oosterhout
On Sat, Apr 15, 2006 at 12:52:49PM +0500, Shoaib Mir wrote:
> Actually what i want to do is store 10010 as the maximum
> value in sequence. Is there a way for it ?

Is that number in binary or decimal? In binary it's easy because it's
only 1048608 decimal. In decimal it would require 66 bits, which
doesn't fit. The is still: why do you want a *sequence* to go that
high? A sequence starts counting a 1 and goes up until the limit. At
one count per second you'd take several million million years to get
though. Bigint indeed only goes upto 9223372036854775807.

If you just want to store numbers, use numeric. Why do you want to
combine numeric and a sequence?
-- 
Martijn van Oosterhout  http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.


signature.asc
Description: Digital signature


Re: [GENERAL] 21 bit number for sequence

2006-04-15 Thread Shoaib Mir
Actually that is the application requirment to use 21 bit numbers as porting it from Oracle where it used to work. Yeah now i have decided to use a numeric data type in a table and use that to write my own nextval and currval functions for that purpose.
Thanks for the help./ShoaibOn 4/15/06, Martijn van Oosterhout  wrote:
On Sat, Apr 15, 2006 at 12:52:49PM +0500, Shoaib Mir wrote:> Actually what i want to do is store 10010 as the maximum
> value in sequence. Is there a way for it ?Is that number in binary or decimal? In binary it's easy because it'sonly 1048608 decimal. In decimal it would require 66 bits, whichdoesn't fit. The is still: why do you want a *sequence* to go that
high? A sequence starts counting a 1 and goes up until the limit. Atone count per second you'd take several million million years to getthough. Bigint indeed only goes upto 9223372036854775807.If you just want to store numbers, use numeric. Why do you want to
combine numeric and a sequence?--Martijn van Oosterhout      http://svana.org/kleptog/> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone> else to do the other 95% so you can sue them.-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFEQKhuIB7bNG8LQkwRAkOpAJ0cRCABC2OmbDDVqNcPuAT0WjADdQCcDkGqdzC7ykqq/h6YhWpgDJIQ0kk==YZzx-END PGP SIGNATURE-


Re: [GENERAL] Curious UDP packets

2006-04-15 Thread Kari Pahula
On Fri, Apr 14, 2006 at 02:59:10PM +0200, Magnus Hagander wrote:
> > omega kernel: Shorewall:all2all:REJECT:IN= OUT=lo SRC=x.x.x.x 
> > DST=x.x.x.x LEN=1016 TOS=0x00 PREC=0x00
> > TTL=64 ID=21629 DF PROTO=UDP SPT=32769 DPT=32769 LEN=996
> 
> The PostgreSQL stats collector uses UDP over a random loopback port. It
> should normally use localhost, though and not a "real" IP. 

It's a virtual server, that (currently) has no loopback device.

Is it possible to tell the stats collector to use a specific port?

> To see if that's it, turn of the stats collector
> (start_stats_collector=off), restart postgresql (restart needed ,not
> enough to just HUP) and see if they go away.

Apparently this didn't prevent those UDP packets...  I'm not certain
about this one, though, since I wasn't the one testing this.

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


[GENERAL] enforce naming convention

2006-04-15 Thread SunWuKung
Hi,
is it possible to enforce naming convention in pg?

Can I create a trigger that runs when a new object is created and see
if its name is in an expected format and if not reject it?

I had to create a new schema 'zref' storing some of our tables to
conceptually separate them but I want to make sure that when we create
new tables we can't have the same table name in 'zref' and 'public'.

Thanks for the help.
Balázs


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] enforce naming convention

2006-04-15 Thread Greg Sabino Mullane

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


> Can I create a trigger that runs when a new object is created and see
> if its name is in an expected format and if not reject it?
  
Sounds like you need a database-wide trigger on DDL. PostgreSQL has nothing
like that at the moment. Your best bet for now is to try and control it
at the application level. You could also run an external program (daemon or
even a cron job) that continually checks for such a violation and reports
it somewhere.

> I had to create a new schema 'zref' storing some of our tables to
> conceptually separate them but I want to make sure that when we create
> new tables we can't have the same table name in 'zref' and 'public'.

Allowing two tables with the same name to exist is a prime feature of schemas,
so working around that is not generally something that is done. :)

- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200604150915
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-

iD8DBQFEQPLxvJuQZxSWSsgRAuP8AJ9awH/+0D8Iy6+hc9qDmbrDDgpWHACgkGFS
pQMAGEFJWUbuonyN5+m15wE=
=b825
-END PGP SIGNATURE-



---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[GENERAL] Comparing text field

2006-04-15 Thread Nik
I am trying to compare a large string (that has new line characters in
it) to the contents of the text field (which also has new line
characters in it) and it is not behaving as expected.

For example I have the following record in the database:
id=83
message=VAC153-683-685-131830-
/O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/
BULLETIN - EAS ACTIVATION REQUESTED
SEVERE THUNDERSTORM WARNING
NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC
142 PM EDT THU APR 13 2006
THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A
* SEVERE THUNDERSTORM WARNING

If I do the following query
SELECT id FROM table1 WHERE message='VAC153-683-685-131830-
/O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/
BULLETIN - EAS ACTIVATION REQUESTED
SEVERE THUNDERSTORM WARNING
NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC
142 PM EDT THU APR 13 2006
THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A
* SEVERE THUNDERSTORM WARNING'

I get no results back, even though the message is equivalent. How
should I perform this comparison so that the above query returns id=83?

Thanks.


---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] 21 bit number for sequence

2006-04-15 Thread Christian Kratzer

Hi,

On Sat, 15 Apr 2006, Shoaib Mir wrote:


Actually that is the application requirment to use 21 bit numbers as porting
it from Oracle where it used to work.


21 bits are no problem as bigints have 64 bits.  If you mean decimal 
digits please explicitly say so. A bit is a binary digit.



Yeah now i have decided to use a numeric data type in a table and use that
to write my own nextval and currval functions for that purpose.


you could also try to fix you application which most certainly is 
severly broken if it tries to store specific numbers in a sequence.


Greetings
Christian

--
Christian Kratzer   [EMAIL PROTECTED]
CK Software GmbHhttp://www.cksoft.de/
Phone: +49 7452 889 135 Fax: +49 7452 889 136

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


[GENERAL] HUGE Stack space is gettiing consumed

2006-04-15 Thread Mavinakuli, Prasanna (STSD)
Hello All,


We are getting very strange problem ..


Scenario..

We Have one data field in some table..type of this field
Is *TEXT*.
We are storing around 1,000 (One Thousand) lines of text 
In that field.

If it's run though separate thread,
When we say select  from 
We are getting 
*could not receive data from server: No such file or directory *
messages without Result

If it was in main thread,
It Works fine. 



Our Analysis::

It looks like stack space issue.when we allocate stack space
Of 1.3 GB to new thread then we will get the Desired 
Outpt I.e All 1,000 lines without any problem.

1)That String is barely 80 k ..there is no direct
Relationship with that size.

2)We can't allocate 1.3 GB,and we also don't have any 
Recusrsive functions,

We would like to know is there any Recursive functions
In postgres -PQExec which might be eating all stack space..
Or what cud be the reason form libpq's point of view.





Please give u'r thougts,

Thanks in advance for U'r Suggetions..
Prasanna.

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] HUGE Stack space is gettiing consumed

2006-04-15 Thread Martijn van Oosterhout
On Fri, Apr 14, 2006 at 09:13:26AM +0530, Mavinakuli, Prasanna (STSD) wrote:
> Hello All,
> 
> We are getting very strange problem ..
> 
> 
> We Have one data field in some table..type of this field
> Is *TEXT*.
> We are storing around 1,000 (One Thousand) lines of text 
> In that field.
> 
> If it's run though separate thread,
> When we say select  from 
> We are getting 
> *could not receive data from server: No such file or directory *
> messages without Result
> 
> If it was in main thread,
> It Works fine. 
> 

So you have a multithreaded program. Have you setup something so that
you don't have two threads trying to do things with libpq at the same
time? Because that won't work.

Secondly, it can't have anything to do with stack-space because when
you run out of stack space you get a segmentation fault, not a nice
error.

Either post a complete example of the failure (with source code) or
perhaps the strace output would be enough.
-- 
Martijn van Oosterhout  http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.


signature.asc
Description: Digital signature


Re: [GENERAL] Comparing text field

2006-04-15 Thread chris smith
On 13 Apr 2006 12:20:08 -0700, Nik <[EMAIL PROTECTED]> wrote:
> I am trying to compare a large string (that has new line characters in
> it) to the contents of the text field (which also has new line
> characters in it) and it is not behaving as expected.
>
> For example I have the following record in the database:
> id=83
> message=VAC153-683-685-131830-
> /O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/
> BULLETIN - EAS ACTIVATION REQUESTED
> SEVERE THUNDERSTORM WARNING
> NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC
> 142 PM EDT THU APR 13 2006
> THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A
> * SEVERE THUNDERSTORM WARNING
>
> If I do the following query
> SELECT id FROM table1 WHERE message='VAC153-683-685-131830-
> /O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/
> BULLETIN - EAS ACTIVATION REQUESTED
> SEVERE THUNDERSTORM WARNING
> NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC
> 142 PM EDT THU APR 13 2006
> THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A
> * SEVERE THUNDERSTORM WARNING'
>
> I get no results back, even though the message is equivalent. How
> should I perform this comparison so that the above query returns id=83?

Could one have \r\n and the other have \n ?

Are you doing the comparison in psql or through a language (php, ruby,
python, other) ?

--
Postgresql & php tutorials
http://www.designmagick.com/

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Asking advice on speeding up a big table

2006-04-15 Thread Francisco Reyes

[EMAIL PROTECTED] writes:


Usage is to match data from the key and val tables to fetch the data
value from the sid table.


What is the relation between key and val tables?
Will key.id and val.id be equal?


I have never quite/fully understand the outputs of analyze, but I wonder why 
you have:



 ->  Nested Loop  (cost=0.00..4467.01 rows=1001 width=20) (actual 
time=0.205..28.304 rows=1000 loops=1)


Why 1000 rows?
Does any of your conditions in the select returns many records?

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Hardware related question: 3ware 9500S

2006-04-15 Thread Francisco Reyes

Merlin Moncure writes:

escalade is a fairly full featured raid controller for the price. 
consider it the ford taurus of raid controllers, it's functional and

practical but not sexy.  Their S line is not native sata but operates
over a pata->sata bridge.  Stay away from raid 5.


Do you know if their raid 5 is better in the new 9550SX?

Or is the "Stay away from raid 5" more of a general comment that this type 
of raid is not good for DBs? 


---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [GENERAL] Hardware related question: 3ware 9500S

2006-04-15 Thread Francisco Reyes

Merlin Moncure writes:


there are reasons to go with raid 5 or other raids. where I work we
often do 14 drive raid 6 plus 1 hot swap on a 15 drive tray.


Raid 5 is different from raid 6 To say that there are times it's ok to 
use RAID 5 and then say you use raid 6... well... doesn't really say 
anything about raid 5.


Also, what controller are you using?
From what I gather, raid 6 is less common and fewer cards support it (areca 

is one of them I believe).


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [GENERAL] 21 bit number for sequence

2006-04-15 Thread Tom Lane
Martijn van Oosterhout  writes:
> If you just want to store numbers, use numeric. Why do you want to
> combine numeric and a sequence?

He could use a numeric column and write the default as
nextval('seq')::numeric

Of course, he'll be paying through the nose performance-wise for
his insistence on not fixing his Oracle-centric data representation,
but if programmer time is cheaper than machine time then maybe it's
the right tradeoff.

regards, tom lane

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Asking advice on speeding up a big table

2006-04-15 Thread Francisco Reyes

[EMAIL PROTECTED] writes:


I have made some minor changes and speeded things up to around 15-20
lookups/sec, good enough, but not exciting :-)



hmm let me understand this.
You went from 1 query 3 to 4 seconds to 45 to 60 queries in the same amount 
of time... 45 to 60 times faster.. and that is not something to be excited 
about. :)



---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


[GENERAL] Update from diferents conditions

2006-04-15 Thread Claudio Alejandro Ulloa Heinsohn
i want update differents rows of a table,  but each row with a diferente 
condition, is possible make that update?




---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [GENERAL] Hardware related question: 3ware 9500S

2006-04-15 Thread Alex Turner
Raid 5 on the 9550SX is supposed to be significantly better than the 9500 series.I would be carefull of benchmarks listed out there.  For instance, whilst looking for supporting material, I came cross this gem:

http://www.gamepc.com/labs/print_content.asp?id=9550sx4lp&cookie%5Ftest=1
They claim the they used a Tyan Thunder K8WE motherboard, and installed the RAID controllers in a 64-bit 133MHz PCI-X slot.  This motherboard doesn't have any 64-bit 133Mhz PCI-X slots! (
http://www.tyan.com/products/html/tigerk8we_spec.html).It's no wonder that the other raid controllers showed significantly less performance than the PCI-e card.
This review from tomshardware:http://www.tomshardware.com/2005/10/31/sata_spells_trouble_for_scsi_raid/page13.html
Suggests that the 9550SX is at least competitive with the others.I know I like the 3ware/AMCC cards because of their very good RAID 10 performance.  I'm not a big RAID 5 fan.  RAID 5 sufferes the read before write penalty problem that make RAID 5 writes very slow, particularly noticebale in OLTP applications.  RAID 10 will almost always offer better write perfomance.
I wish we could set up an organization to do benchmarks with pgbench on various different RAID controllers/drives and publish the results.  I know I would pay money for that.Alex
On 4/15/06, Francisco Reyes <[EMAIL PROTECTED]
> wrote:
Merlin Moncure writes:> escalade is a fairly full featured raid controller for the price.> consider it the ford taurus of raid controllers, it's functional and> practical but not sexy.  Their S line is not native sata but operates
> over a pata->sata bridge.  Stay away from raid 5.Do you know if their raid 5 is better in the new 9550SX?Or is the "Stay away from raid 5" more of a general comment that this type

of raid is not good for DBs?---(end of broadcast)---TIP 4: Have you searched our list archives?   
http://archives.postgresql.org




Re: [GENERAL] Hardware related question: 3ware 9500S

2006-04-15 Thread Guy Rouillier
Alex Turner wrote:
> Raid 5 on the 9550SX is supposed to be significantly better than the
> 9500 series. 
> 
> I would be carefull of benchmarks listed out there.  For instance,
> whilst looking for supporting material, I came cross this gem: 
>
http://www.gamepc.com/labs/print_content.asp?id=9550sx4lp&cookie%5Ftest=
1
> 
> They claim the they used a Tyan Thunder K8WE motherboard, and
> installed the RAID controllers in a 64-bit 133MHz PCI-X slot.  This
> motherboard doesn't have any 64-bit 133Mhz PCI-X slots! (
> http://www.tyan.com/products/html/tigerk8we_spec.html).   
> It's no wonder that the other raid controllers showed significantly
> less performance than the PCI-e card. 

You're looking at the wrong board.  They are talking about the Tyan
*Thunder*, which does indeed have 64-bit PCI-X.  You are looking at the
Tyan **Tiger**, which does not.

-- 
Guy Rouillier

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[GENERAL] starne error from select 1!=-1

2006-04-15 Thread Andrus
select 1!=-1

causes

ERROR:  operator does not exist: integer !=- integer
HINT:  No operator matches the given name and argument type(s). You may need 
to add explicit type casts.


Isn't this a bit stange ?
If I add space before -1 error does not appear.



---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] starne error from select 1!=-1

2006-04-15 Thread Tom Lane
"Andrus" <[EMAIL PROTECTED]> writes:
> select 1!=-1
> ERROR:  operator does not exist: integer !=- integer

> Isn't this a bit stange ?

No.  We couldn't really parse this any other way without disallowing -
(and +) altogether in multi-character operator names.  There's a special
hack for SQL-spec compatibility, but it doesn't trigger in this case;
see

http://www.postgresql.org/docs/8.1/static/sql-syntax.html#SQL-SYNTAX-OPERATORS

regards, tom lane

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Hardware related question: 3ware 9500S

2006-04-15 Thread Francisco Reyes

Alex Turner writes:


Suggests that the 9550SX is at least competitive with the others.


Thanks for the links.

I know I like the 3ware/AMCC cards because of their very good RAID 10 
performance.


Raid 10 is what I used on my last server and likely what I will use on the 
next.



I wish we could set up an organization to do benchmarks with pgbench on 
various different RAID controllers/drives and publish the results.  I know 
I would pay money for that.


Yes. That would be truly very usefull, although it would be very time 
consuming.



---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[GENERAL] Question about selecting rows

2006-04-15 Thread Hrishikesh Deshmukh
Hi All,I have a question about selecting rows, my table has 20,000 rows, i want to look at rows 5000 to 10,000.How does one use the select statement in this case since i don't have a specific case to use where?!
Thanks in advance.Hrishi


Re: [GENERAL] Question about selecting rows

2006-04-15 Thread Douglas McNaught
"Hrishikesh Deshmukh" <[EMAIL PROTECTED]> writes:

> Hi All,
>
> I have a question about selecting rows, my table has 20,000 rows, i want to
> look at rows 5000 to 10,000.

There is no defined row ordering in SQL unless you use ORDER BY, so
you need to specify how you want to sort it first.

> How does one use the select statement in this case since i don't have a
> specific case to use where?!

Something like:

SELECT * FROM mytable ORDER BY index_column LIMIT 5000 OFFSET 5000;

If you leave out the ORDER BY you will get the rows in a non-specified
order, which may be different and (in this case) include a different
set of rows the next time you run it.

-Doug

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Question about selecting rows

2006-04-15 Thread Michael Fuhr
On Sat, Apr 15, 2006 at 06:44:29PM -0400, Hrishikesh Deshmukh wrote:
> I have a question about selecting rows, my table has 20,000 rows, i want to
> look at rows 5000 to 10,000.

See OFFSET and LIMIT in the SELECT documentation.  Be sure to read
the advice about using ORDER BY.

http://www.postgresql.org/docs/8.1/interactive/sql-select.html#SQL-LIMIT

-- 
Michael Fuhr

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Update from diferents conditions

2006-04-15 Thread Nirmalya Lahiri
 I think it is not possible using a single SQL command. You have to
issue separate SQL command for each row.



--- Claudio Alejandro Ulloa Heinsohn <[EMAIL PROTECTED]> wrote:

> i want update differents rows of a table,  but each row with a
> diferente 
> condition, is possible make that update?
> 
> 
> 
> ---(end of
> broadcast)---
> TIP 9: In versions below 8.0, the planner will ignore your desire
> to
>choose an index scan if your joining column's datatypes do
> not
>match
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Comparing text field

2006-04-15 Thread Nirmalya Lahiri
You have made a wrong mistake in your SQL quary.
Your quary should be look like this.

SELECT id FROM table1 WHERE message like '%VAC153-683-685-131830-
/O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/
BULLETIN - EAS ACTIVATION REQUESTED
SEVERE THUNDERSTORM WARNING
NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC
142 PM EDT THU APR 13 2006
THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A
* SEVERE THUNDERSTORM WARNING';




--- Nik <[EMAIL PROTECTED]> wrote:

> I am trying to compare a large string (that has new line characters
> in
> it) to the contents of the text field (which also has new line
> characters in it) and it is not behaving as expected.
> 
> For example I have the following record in the database:
> id=83
> message=VAC153-683-685-131830-
> /O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/
> BULLETIN - EAS ACTIVATION REQUESTED
> SEVERE THUNDERSTORM WARNING
> NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC
> 142 PM EDT THU APR 13 2006
> THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A
> * SEVERE THUNDERSTORM WARNING
> 
> If I do the following query
> SELECT id FROM table1 WHERE message='VAC153-683-685-131830-
> /O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/
> BULLETIN - EAS ACTIVATION REQUESTED
> SEVERE THUNDERSTORM WARNING
> NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC
> 142 PM EDT THU APR 13 2006
> THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A
> * SEVERE THUNDERSTORM WARNING'
> 
> I get no results back, even though the message is equivalent. How
> should I perform this comparison so that the above query returns
> id=83?
> 
> Thanks.
> 
> 
> ---(end of
> broadcast)---
> TIP 3: Have you checked our extensive FAQ?
> 
>http://www.postgresql.org/docs/faq
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


[GENERAL] Google Summer of Code (Fix aggregate operators & Implement features such as Data Cubes and Skyline)

2006-04-15 Thread Benjamin Arai



Hi,
 
A good project for 
the Google summer of code would be to solve the aggregate problems in 
PostgreSQL.  In addition, add some of the more complex operators such as 
rollup and etc.  These features can help close the gap between PostgreSQL 
and popular commercial offerings such as Oracle and DB2.
 

Benjamin Arai
[EMAIL PROTECTED]
http://www.benjaminarai.com
 


Re: [GENERAL] Google Summer of Code (Fix aggregate operators & Implement features such as Data Cubes and Skyline)

2006-04-15 Thread Tom Lane
"Benjamin Arai" <[EMAIL PROTECTED]> writes:
> A good project for the Google summer of code would be to solve the aggregate
> problems in PostgreSQL.  In addition, add some of the more complex operators
> such as rollup and etc.

That seems a tad ambitious, unless the SOCcer has already done some
nontrivial backend work ...

regards, tom lane

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Google Summer of Code (Fix aggregate operators & Implement features such as Data Cubes and Skyline)

2006-04-15 Thread Benjamin Arai
Hi,

Myself and a friend are PhD students at the University of California,
Riverside.  We would be interested in such a project if it were available.
We are both experienced developers previously interning at EA Games and
current system administrators for the CS department.

Benjamin Arai
[EMAIL PROTECTED]
http://www.benjaminarai.com
 
 

> -Original Message-
> From: Tom Lane [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, April 15, 2006 7:14 PM
> To: Benjamin Arai
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Google Summer of Code (Fix aggregate 
> operators & Implement features such as Data Cubes and Skyline) 
> 
> "Benjamin Arai" <[EMAIL PROTECTED]> writes:
> > A good project for the Google summer of code would be to solve the 
> > aggregate problems in PostgreSQL.  In addition, add some of 
> the more 
> > complex operators such as rollup and etc.
> 
> That seems a tad ambitious, unless the SOCcer has already 
> done some nontrivial backend work ...
> 
>   regards, tom lane
> 


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Hardware related question: 3ware 9500S

2006-04-15 Thread Alex Turner
I have the time to do it, but not the $$s ;)AlexOn 4/15/06, Francisco Reyes <[EMAIL PROTECTED]
> wrote:Alex Turner writes:> Suggests that the 9550SX is at least competitive with the others.
Thanks for the links.> I know I like the 3ware/AMCC cards because of their very good RAID 10> performance.Raid 10 is what I used on my last server and likely what I will use on thenext.
> I wish we could set up an organization to do benchmarks with pgbench on> various different RAID controllers/drives and publish the results. I know> I would pay money for that.Yes. That would be truly very usefull, although it would be very time
consuming.


Re: [GENERAL] Hardware related question: 3ware 9500S

2006-04-15 Thread Alex Turner
A... good point.Why oh why does tyan have two boards with the same prefix ;)!!!AlexOn 4/15/06, Guy Rouillier <
[EMAIL PROTECTED]> wrote:Alex Turner wrote:> Raid 5 on the 9550SX is supposed to be significantly better than the
> 9500 series.>> I would be carefull of benchmarks listed out there.  For instance,> whilst looking for supporting material, I came cross this gem:>
http://www.gamepc.com/labs/print_content.asp?id=9550sx4lp&cookie%5Ftest=1>> They claim the they used a Tyan Thunder K8WE motherboard, and> installed the RAID controllers in a 64-bit 133MHz PCI-X slot.  This
> motherboard doesn't have any 64-bit 133Mhz PCI-X slots! (> http://www.tyan.com/products/html/tigerk8we_spec.html).> It's no wonder that the other raid controllers showed significantly
> less performance than the PCI-e card.You're looking at the wrong board.  They are talking about the Tyan*Thunder*, which does indeed have 64-bit PCI-X.  You are looking at theTyan **Tiger**, which does not.
--Guy Rouillier---(end of broadcast)---TIP 2: Don't 'kill -9' the postmaster


[GENERAL] Help about physical page layout in PostgreSQL:

2006-04-15 Thread Yeye

Hi,
 
I was trying to modify the physical page layout in PostgreSQL. I understand the source code for physical page organization is located at bufpage.c but I wonder what is the external interface for this physical page organization. Interface like InsertRecToPage, DeleteRecFromPage, GetAttr, GetRec, etc? 

 
My question are 1.where are the source files for these interfaces to physical page?
2. Are there more detailed technical documentation for this kind of stuff? The documentation at the website is more llike a external description of the whole system. Is there any technical documentation for the code? 

 
Thank you for your time, any help is appreciated!
Best,
Yeye