Re: [GENERAL] working with multidimensional arrays in plpgsql

2005-01-26 Thread Sibtay Abbas
On Wed, 26 Jan 2005 12:40:24 +0500, Sibtay Abbas <[EMAIL PROTECTED]> wrote: > hello everyone > > i am having problem with multidimensional arrays in plpgsql following > is the source code of the function which i am trying to run > > CREATE OR REPLACE FUNCTION test() RETURNS VOID AS $$ > DECLARE >

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-26 Thread Magnus Hagander
> > Sorry, but any Windows user who thinks he doesn't need security > > measures equivalent to (not "beyond") minimum Unix practice > is a dummy > > about security. Take a look at this LOAD vulnerability > we're in the > > midst of patching, and ask yourself whether you aren't glad that it >

Re: [GENERAL] text field constraint advice

2005-01-26 Thread Jeff Davis
On Wed, 2005-01-26 at 00:08 -0700, Michael Fuhr wrote: > On Wed, Jan 26, 2005 at 12:27:17AM -0600, Dale Sykora wrote: > > > I would like to use a text field in a table and limit the size to > > reduce the chance of denial-of-service/buffer overflow/etc. I assume I > > can define table field

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-26 Thread Magnus Hagander
> >> Not all Windows users are dummies about security and need > PostgreSQL > >> to enforce security measures beyond those implemented on other > >> platforms. > > > > First of all, it does *not* enforce anything beyond what's > enforced on > > Unix. On Unix, it doesn't run as root. On Windows

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-26 Thread Michael Glaesemann
On Jan 26, 2005, at 17:11, Magnus Hagander wrote: OK, perhaps I'm not comparing apples to apples. On OS X I have an administrative account and I can run PostgreSQL just fine. So what you are saying is an administrative account on Windows is more like root on Unix. Really? I'd call that a bug in the

[GENERAL] Lower case

2005-01-26 Thread Vladimir S. Petukhov
Hi! Sorry for my English.. I want to do case-insensitivity search, like this ... WHERE lower (column_name) LIKE lower (%value%); This work fine for English.. But i need search for Russian words, lower() operator does not work with Russian (non-English) chars, but ORDER works fine...

Re: [GENERAL] Extended unit

2005-01-26 Thread Richard Huxton
Tom Lane wrote: Pailloncy Jean-Gerard <[EMAIL PROTECTED]> writes: I do not want for each column and each row to store the value and the unit. I do want to put the unit in the definition of the column and the check on the parser before any execution. If you do that, you foreclose the ability to

Re: [GENERAL] Good PostgreSQL Based Shopping Cart Software ... ?

2005-01-26 Thread Richard Huxton
Marc G. Fournier wrote: Got a client that needs a shopping cart, and if I can help it, would rather offer them a 'ready made' package and then customize that to fit their site visually, then build everything from scratch, and only give them 10% of the features of a full package ... It doesn't h

Re: [GENERAL] Lower case

2005-01-26 Thread Tino Wildenhain
Hi, On Wed, 2005-01-26 at 12:01 +, Vladimir S. Petukhov wrote: > Hi! > > Sorry for my English.. > > I want to do case-insensitivity search, like this > ... WHERE lower (column_name) LIKE lower (%value%); > This work fine for English.. > But i need search for Russian words, lower() operator d

Re: [GENERAL] Lower case

2005-01-26 Thread Dawid Kuroczko
On Wed, 26 Jan 2005 12:01:49 +, Vladimir S. Petukhov <[EMAIL PROTECTED]> wrote: > I want to do case-insensitivity search, like this > ... WHERE lower (column_name) LIKE lower (%value%); > This work fine for English.. > But i need search for Russian words, lower() operator does not work with > R

Re: [GENERAL] difficult JOIN

2005-01-26 Thread Thomas Chille
Hi Jim, thanks for your answer! > Hrm. So for a given tour, employee, you want to pair the first record in > plan with the first record in work, and the second record in plan with > the second record in work? Yes you understand me well, thats what i'm trying to achieve. > Doing that will be pre

Re: [GENERAL] Extended unit

2005-01-26 Thread Martijn van Oosterhout
On Tue, Jan 25, 2005 at 11:41:28PM +0100, Pailloncy Jean-Gerard wrote: > I have begining to put all the SI unit in a table. > I am writing the function to check the unit in a standard way. > I plan to use the user-defined type proposed by Tom Lane. > The check are done at execution time. > > But I

Re: [GENERAL] Extended unit

2005-01-26 Thread Martijn van Oosterhout
On Wed, Jan 26, 2005 at 09:06:16AM +, Richard Huxton wrote: > Tom Lane wrote: > >If you do that, you foreclose the ability to store mixed values in a > >single column, in return for what? Saving a couple of bytes per value? > >(I suppose that in a serious implementation we'd store the units as

[GENERAL] log_min_duration_statement

2005-01-26 Thread Eric Brown
I set this to 250 and the statements that take longer than this are logged... but my driver is creating all kinds of cursors, so it isn't logging anything useful. Yet, if I log all statement (log_statment='mod'), I get way more logging than is useful. Is there a happy medium? This is what I'm

Re: [GENERAL] difficult JOIN

2005-01-26 Thread Martijn van Oosterhout
On Wed, Jan 26, 2005 at 11:22:48AM +0100, Thomas Chille wrote: > > More important, does it even make sense? What if an employee ends up not > > working at all for one of his/her planned times? Every record after that > > would be completely skewed. Wouldn't it make much more sense to either > > ass

Re: [GENERAL] Lower case

2005-01-26 Thread Michal Hlavac
Tino Wildenhain wrote: Hi, On Wed, 2005-01-26 at 12:01 +, Vladimir S. Petukhov wrote: Hi! Sorry for my English.. I want to do case-insensitivity search, like this ... WHERE lower (column_name) LIKE lower (%value%); This work fine for English.. But i need search for Russian words, lower() operat

Re: [GENERAL] Extended unit

2005-01-26 Thread Pailloncy Jean-Gerard
It strikes me that the right level of constraint is the quantity being represented: length / mass / time / velocity. Then you could store any of: '1inch', '2m', '3km', '4light-years' in a "length" column. Ofcourse, only one of those is in SI units :) Just like the interval type, all this could be h

Re: [GENERAL] Extended unit

2005-01-26 Thread Michael Glaesemann
On Jan 26, 2005, at 20:06, Pailloncy Jean-Gerard wrote: It strikes me that the right level of constraint is the quantity being represented: length / mass / time / velocity. Then you could store any of: '1inch', '2m', '3km', '4light-years' in a "length" column. Ofcourse, only one of those is in S

Re: [GENERAL] Extended unit

2005-01-26 Thread Martijn van Oosterhout
On Wed, Jan 26, 2005 at 12:06:15PM +0100, Pailloncy Jean-Gerard wrote: > If I have a column with "speed DOUBLE(m1s-1)" > I want to be able to put in in any unit format. > If I want special output, I would have a function > doubleunit_to_char(speed,'si') that will output "3 m/s" and > doubleunit_to_

Re: [GENERAL] Extended unit

2005-01-26 Thread Csaba Nagy
Hi all, I wonder if it makes sense to implement the units as separate data types ? Cause that's what they are really. So "amper" would be a data type which aliases one of the numeric data types (depending on what precision range you need), but does not allow to be added with anything else than "am

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-26 Thread Raymond O'Donnell
On 25 Jan 2005 at 8:45, [EMAIL PROTECTED] wrote: > Do you need something from PostgreSQL that Firebird doesn't have? My > experience has been that Firebird/Interbase is a fairly complete, ACID > compliant, low/no maintenance back end for single workstation > applications. ...except that it lacks

Re: [GENERAL] Lower case

2005-01-26 Thread Oleg Bartunov
Vladimir, there is pgsql-ru-general mailing list for russian speaking people Oleg On Wed, 26 Jan 2005, Vladimir S. Petukhov wrote: Hi! Sorry for my English.. I want to do case-insensitivity search, like this ... WHERE lower (column_name) LIKE lower (%value%); This work fine for English.. Bu

Re: [GENERAL] EMBEDDED PostgreSQL

2005-01-26 Thread Richard_D_Levine
> Running the app and dbms in the same process > space will not guarantee that bugs in app will not mess up the database. By embedded I thought we were saying *invisible to the user*. I agree that having the database back end linked into user processes is dangerous. I don't know if you can still

Re: [GENERAL] [ODBC] ODBC (win32) X PostgreSQL(Linux)

2005-01-26 Thread Eric E
Hi Fabricio, fbbsantos wrote: What details do you need? I need to know enough that if I sat down at your computer I could find the problem. For example, what language or application are you using? Are you using a DSN, or a DSN-less connection? What connection string have you used in your ap

Re: [GENERAL] text field constraint advice

2005-01-26 Thread Frank D. Engel, Jr.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Well, that's all fine as long as the hacker does not connect directly to the database server when attempting his attack. Check it in the app yes, but if this is really a genuine concern, it should be reinforced by the server as an added precaution.

[GENERAL] Case Insensitive & Accent Insensitive

2005-01-26 Thread icaro
Hello,       We have an application we want to migrate to PostGreSQL. Our application uses a lot of queries comparing strings with Like and =. It is an application for libraries and we need to do the comparisons in a case insensitive and accent insensitive way.     We are trying to save ti

[GENERAL] cleanup of pg_temp schemas

2005-01-26 Thread Marcel Gsteiger
Hi all, My PostgreSQL app uses temporary tables. After some time, my database shows lots of pg_temp_xxx schemas with no data inside. I tried to do a vacuum full analyze to get rid of them, but they still persisted. Who takes care for removing these schemas? Can I safely ignore them, or do I ha

Re: [GENERAL] [ODBC] ODBC (win32) X PostgreSQL(Linux)

2005-01-26 Thread Andrew L. Gould
On Wednesday 26 January 2005 07:07 am, Eric E wrote: > Hi Fabricio, > > fbbsantos wrote: > > What details do you need? > > I need to know enough that if I sat down at your computer I could > find the problem. > For example, what language or application are you using? > Are you using a DSN, or a DS

Re: [GENERAL] Size of data stored in bytea record?

2005-01-26 Thread Carlos Oliva
Thank you Michael. I am using the BIT_LENGTH function which seems to return the size in bits of the stored blob "Michael Fuhr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, Jan 25, 2005 at 04:58:33PM -0500, Carlos wrote: > >> Is there a way that I can find out the size of

[GENERAL] backslashes in queries containing LIKE

2005-01-26 Thread Mickael Faivre-Macon
Hi, We have a problem with backslashes in queries containing LIKE. insert into table (field) values ('IM\\test') select * from table where field = 'IM\\test' returns one record select * from table where field LIKE 'IM\\%' returns no record Why is postgres behaves like that ? Can someone help

Re: [GENERAL] Extended unit

2005-01-26 Thread Frank D. Engel, Jr.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 That's not necessarily a constant; there is evidence to suggest that the speed of light is slowing down over time. If that is indeed the case, then as light travels more slowly, a light year will become shorter. http://www.ldolphin.org/speedo.html

Re: [GENERAL] Recursive queries

2005-01-26 Thread Christopher Browne
In an attempt to throw the authorities off his trail, kleptog@svana.org (Martijn van Oosterhout) transmitted: > On Mon, Jan 24, 2005 at 05:27:46PM +0100, tmp wrote: >> Are there any plans on implementing support for recursive queries in >> postgresql in the near future? If so: When? >> >> I can s

Re: [GENERAL] log_min_duration_statement

2005-01-26 Thread Lonni J Friedman
Setting the number of something higher than 250ms ? On Wed, 26 Jan 2005 02:39:21 -0800, Eric Brown <[EMAIL PROTECTED]> wrote: > I set this to 250 and the statements that take longer than this are > logged... but my driver is creating all kinds of cursors, so it isn't > logging anything useful. Ye

[GENERAL] Problem with NOT IN and Sub-Select

2005-01-26 Thread mike
I have the following query SELECT vw_mail_add.contact_id, vw_mail_add.first_name, vw_mail_add.last_name, vw_mail_add.address1, vw_mail_add.add2, vw_mail_add.add3, vw_mail_add.add4, vw_mail_add.add5, vw_mail_add.add6 FROM vw_mail_add JOIN tb_contact_role ON vw_mail_add.contact_id = tb_contact_role.

[GENERAL] how come I get this error message when I try to connect to Postgresql

2005-01-26 Thread Danny Lu
Hello all, I am running Postgresql 8.0.0 on Windows 98. When I try to connect to the database with psql.exe using "psql.exe -h localhost -p 5432 template1 postgres" I get an error message like this: PSQL: could not connect to server: Connection refused (0x274D/10061) Is the server r

[GENERAL] Best practices - permission handling

2005-01-26 Thread Együd Csaba
Hi All, I'd like to ask some help on finding out which is the best way to automatically give permissions for users to access database objects. I try to plan a system where there are users who are sorted into groups (mirror of the orgaization). The groups should have permissions for functionaliti

Re: [GENERAL] Problem with NOT IN and Sub-Select

2005-01-26 Thread Richard Huxton
mike wrote: I have the following query SELECT vw_mail_add.contact_id, vw_mail_add.first_name, vw_mail_add.last_name, vw_mail_add.address1, vw_mail_add.add2, vw_mail_add.add3, vw_mail_add.add4, vw_mail_add.add5, vw_mail_add.add6 FROM vw_mail_add JOIN tb_contact_role ON vw_mail_add.contact_id = tb_co

Re: [GENERAL] Extended unit

2005-01-26 Thread Robby Russell
On Wed, 2005-01-26 at 08:45 -0500, Frank D. Engel, Jr. wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > That's not necessarily a constant; there is evidence to suggest that > the speed of light is slowing down over time. If that is indeed the > case, then as light travels more slowl

Re: [GENERAL] Problem with NOT IN and Sub-Select

2005-01-26 Thread Sibtay Abbas
Add "NOT NULL" keyword in the WHERE clause of your SUB SELECT statement something like that ..NOT IN ( SELECT contact_id FROM tb_contact_role WHERE type2 <> 72 AND type2 NOT NULL) On Wed, 26 Jan 2005 15:03:17 +, mike <[EMAIL PROTECTED]> wrote: > I have the following query > > SE

[GENERAL] Partitioning Postgresql

2005-01-26 Thread phil campaigne
Hello All, I know that with Oracle you can partition the tables into logical subsets and was wondering if this was also possible in postgres. Also is postgresql supported on linux cluusters? Thanks in advance, Phil ---(end of broadcast)--- TIP 9: t

Re: [GENERAL] how come I get this error message when I try to connect

2005-01-26 Thread Richard Huxton
Danny Lu wrote: Hello all, I am running Postgresql 8.0.0 on Windows 98. When I try to connect to the database with psql.exe using "psql.exe -h localhost -p 5432 template1 postgres" I get an error message like this: PSQL: could not connect to server: Connection refused (0x274D/10061)

Re: [GENERAL] how come I get this error message when I try to connect to Postgresql

2005-01-26 Thread Lonni J Friedman
Is the server running on host "localhost" and accepting TCP/IP connections on port 5432? What does your pg_hba.conf look like? Did you enable TCP/IP connections in postgresql.conf ? On Wed, 26 Jan 2005 10:04:35 -0500, Danny Lu <[EMAIL PROTECTED]> wrote: > Hello all, >I am running Postgresql

Re: [GENERAL] Recursive queries

2005-01-26 Thread Martijn van Oosterhout
On Wed, Jan 26, 2005 at 08:52:37AM -0500, Christopher Browne wrote: > By recursive queries, we mean the form defined in SQL3/SQL.1999. > > IBM DB2 uses a syntax like the following; I'd have to rummage around > for extra books to verify standards conformance, but hopefully this > gives the idea...

Re: [GENERAL] cleanup of pg_temp schemas

2005-01-26 Thread Tom Lane
"Marcel Gsteiger" <[EMAIL PROTECTED]> writes: > My PostgreSQL app uses temporary tables. After some time, my database shows > lots of pg_temp_xxx schemas with no data inside. I tried to do a vacuum full > analyze to get rid of them, but they still persisted. Ignore them.

[GENERAL] Splitting queries across servers

2005-01-26 Thread Max
Hello, Our postgresql database is getting too big to be handled by one server. We need the database to be in RAM and cannot afford swapping. At the moment, we're using only 3GB or RAM, however our business growth is going to drive this number into the double digits zone, maybe triple digits. What

Re: [GENERAL] cleanup of pg_temp schemas

2005-01-26 Thread Martijn van Oosterhout
On Wed, Jan 26, 2005 at 02:28:46PM +0100, Marcel Gsteiger wrote: > Hi all, > > My PostgreSQL app uses temporary tables. After some time, my database > shows lots of pg_temp_xxx schemas with no data inside. I tried to do > a vacuum full analyze to get rid of them, but they still persisted. In gene

Re: [GENERAL] backslashes in queries containing LIKE

2005-01-26 Thread Michael Fuhr
On Wed, Jan 26, 2005 at 02:44:40PM +0100, Mickael Faivre-Macon wrote: > We have a problem with backslashes in queries containing LIKE. > > insert into table (field) values ('IM\\test') > select * from table where field = 'IM\\test' > > returns one record > > select * from table where field LIKE

[GENERAL] Export a column in a view without "announcing" it?

2005-01-26 Thread Frank D. Engel, Jr.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm fairly certain there is currently no way to do this, but it would make life a bit easier for me right now if there were, so I guess I'm going to ask it anyway, just in case: Is there any way to expose a column in a view without "announcing" the

Re: [GENERAL] Size of data stored in bytea record?

2005-01-26 Thread Michael Fuhr
On Wed, Jan 26, 2005 at 08:38:55AM -0500, Carlos Oliva wrote: > Thank you Michael. I am using the BIT_LENGTH function which seems to return > the size in bits of the stored blob Do you need the length in bits? If not, then one of the other functions in the documentation I referenced might be c

Re: [GENERAL] Splitting queries across servers

2005-01-26 Thread Frank D. Engel, Jr.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wow. Your needs really *are* demanding. You might need to look into a high-end server to meet those kinds of needs - Sun has some *very* expensive hardware that can handle over 1/2TB of RAM, for example, and Cray makes supercomputers (even more *ve

Re: [GENERAL] backslashes in queries containing LIKE

2005-01-26 Thread Mickael Faivre-Macon
Hi Michael, Thank you for your reply. We had read the LIKE doc but obviously missing the fact that "the backslash already has a special meaning in string literals, so to write a pattern constant that contains a backslash you must write two backslashes in an SQL statement. Thus, writing a patter

Re: [GENERAL] Partitioning Postgresql

2005-01-26 Thread Richard Huxton
phil campaigne wrote: Hello All, I know that with Oracle you can partition the tables into logical subsets and was wondering if this was also possible in postgres. No (except by hand, with a view layered over the top). Also is postgresql supported on linux cluusters? And no (at least not without s

Re: [GENERAL] Extended unit

2005-01-26 Thread Greg Stark
Martijn van Oosterhout writes: > Now, how to store the relationships between them to handle > multiplication and division. Probably go back to base types... I've thought about this myself quite a bit. I decided that trying to implement multiplication and division is a bad idea. What you really

Re: [GENERAL] text field constraint advice

2005-01-26 Thread Alex Turner
Generaly network security suggests that your database server should not allow connections from external addresses (including for services like ssh as well as pgsql). iptables can help acheive this if your servers are all on public IPs (also not a very good idea), otherwise the best place to config

Re: [GENERAL] Lower case

2005-01-26 Thread Vladimir S. Petukhov
pg_controldata /var/pgsql/data ... LC_COLLATE: ru_RU LC_CTYPE: ru_RU bash-2.05b# psql -l List of databases Name| Owner | Encoding ---+--+-- testdb | postgres | UNICODE And LIKE, ILIKE, ~ do not rec

Re: [GENERAL] Splitting queries across servers

2005-01-26 Thread John Sidney-Woollett
We configured a slony1 cluster with a master and slave (both 7.4.6), and used the slave to serve read-only queries thereby offloading some of the work from the master database. This worked well for us. You could also take a look at pg_pool to distribute your load - but I haven't actually used i

Re: [GENERAL] PostgreSQL 8.0 for RH AS

2005-01-26 Thread Fabio Esposito
Thanks for all you imput guys. I'll try one of the two methods soon, F.E. On Tue, 25 Jan 2005, Devrim GUNDUZ wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > Hi, > > On Tue, 25 Jan 2005, Fabio Esposito wrote: > > > I wanted to ask if anyone knows if 8.0 is available as a RH AS p

Re: [GENERAL] Lower case

2005-01-26 Thread Tom Lane
"Vladimir S. Petukhov" <[EMAIL PROTECTED]> writes: > pg_controldata /var/pgsql/data > ... > LC_COLLATE: ru_RU > LC_CTYPE: ru_RU > bash-2.05b# psql -l > List of databases >Name| Owner | Encoding > ---+--+-

Re: [GENERAL] Lower case

2005-01-26 Thread Vladimir S. Petukhov
On Wednesday 26 January 2005 20:01, you wrote: > "Vladimir S. Petukhov" <[EMAIL PROTECTED]> writes: > > pg_controldata /var/pgsql/data > > ... > > LC_COLLATE: ru_RU > > LC_CTYPE: ru_RU > > > > bash-2.05b# psql -l > > List of databases >

Re: [GENERAL] Apparently I don't understand full outer joins....

2005-01-26 Thread Lee Harr
select coalesce(a.n,0) as a, coalesce(b.n,0) as b, coalesce(c.n,0) as c, coalesce(a.s,b.s,c.s) as s from ( select 1 as n, 0 as s) a full outer join ( select 1 as n, 1 as s) b full outer join ( select 2 as n, 2 as s) c on a.s = b.s and b.s = c.s

[GENERAL] Partitioning Postgresql

2005-01-26 Thread phil campaigne
>phil campaigne wrote: Hello All, I know that with Oracle you can partition the tables into logical subsets and was wondering if this was also possible in postgres. >No (except by hand, with a view layered over the top). Also is postgresql supported on linux cluusters? >And no (at least not with

[GENERAL] more information for SRF function

2005-01-26 Thread Pavel Stehule
Hello, this is questions for hackers. Is possible put SRF functions more informations about context of calling SRF function? Not now. I know, but in future. For example: I have heavy SRF function which returns more thausand records, but returned set is filtered WHERE and limit clause. If I hav

Re: [GENERAL] text field constraint advice

2005-01-26 Thread Michael Fuhr
On Wed, Jan 26, 2005 at 01:29:53PM -0500, Alex Turner wrote: > Generaly network security suggests that your database server should > not allow connections from external addresses (including for services > like ssh as well as pgsql). iptables can help acheive this if your > servers are all on publ

[GENERAL] self-join on subselect

2005-01-26 Thread PFC
How do you do a self-join on a subselect ? like SELECT a.x+b.x FROM (subselect) a, (subselect) b WHERE a.id = b.id+10 but without performing the subselect twice ..? ---(end of broadcast)--- TIP 9

Re: [GENERAL] Calculating a moving average

2005-01-26 Thread PFC
Make a plpgsql function which will iterate over the rows on which the moving average is to be done (FOR row IN SELECT), of course use the correct order, then use an array as a FIFO, add a row to the moving average and push it, pop the old one and substract it. Roundoff errors will bite your

Re: [GENERAL] Partitioning Postgresql

2005-01-26 Thread Guy Rouillier
phil campaigne wrote: > > Does this also mean that you cannot physically split a database over > multiple physical servers? > Phil Physically, yes, logically no. Suppose, for example, you have two servers A and B, both running PostgreSQL with corresponding databases dbA and dbB. Depending on w

Re: [GENERAL] on update / on delete performance of foreign keys

2005-01-26 Thread PFC
It's a bit more complicated than that as there are also locking issues, like what if other processes insert rows while some others are being deleted, really the whole thing isn't trivial. Since postgres already incoporates code to check foreign keys more efficiently (when doing alter table .

Re: [GENERAL] Extended unit

2005-01-26 Thread PFC
If you allow multiplication and division, you'd need to store not only one type, but an expression like m.s^-2, etc. You'll end up with something with Maple. Isn't there some free open source algebraic computation toolkit with equations and units somewhere ? ---(end

Re: [GENERAL] Recursive queries

2005-01-26 Thread PFC
Check out ltree http://www.sai.msu.su/~megera/postgres/gist/ltree/ On Tue, 25 Jan 2005 22:03:58 +0100, tmp <[EMAIL PROTECTED]> wrote: I don't think anybody has written the syntactic sugar, but someone did write a function that provides equivalent output. I think it is important that the funcionalit

Re: [GENERAL] visualizing B-tree index coverage

2005-01-26 Thread PFC
I think you missed an important "feature" of multicolumn indexes, that you better not use 'OR' in your expressions. You seem to want only to use '>=' so this should be OK. Suppose you have 3 columns a,z,e containing values linearly distributed between ... select min(a),max(a),min(z),max(z

[GENERAL] Numeric type

2005-01-26 Thread phil campaigne
Hi All, I have a double type in java that I am trying to store in postgresql as type numeric and it doesn't seem to like it. The error message is, function double(numeric) does not exist unable to identify a function that satisfies the given argument type you may need to add explicit type casts.

Re: [GENERAL] self-join on subselect

2005-01-26 Thread Jim C. Nasby
It's not at all clear what you're asking. Do you have a real example, preferably with EXPLAIN output? On Wed, Jan 26, 2005 at 11:12:25PM +0100, PFC wrote: > > How do you do a self-join on a subselect ? > > like > SELECT a.x+b.x FROM (subselect) a, (subselect) b WHERE a.id = b.i

Re: [GENERAL] difficult JOIN

2005-01-26 Thread Jim C. Nasby
On Wed, Jan 26, 2005 at 11:22:48AM +0100, Thomas Chille wrote: > In the meanwhile i gave every record an position counter (per tour and > employee), derrived from begin_time, per trigger, and merged them in > this way: How are you generating the position counter? A sequence? If you multiply by som

Re: [GENERAL] Extended unit

2005-01-26 Thread PFC
I wonder if it makes sense to implement the units as separate data types ? Cause that's what they are really. So "amper" would be a data type which aliases one of the numeric data types (depending on what precision range you need), but does not allow to be added with anything else than "amper". Any

Re: [GENERAL] self-join on subselect

2005-01-26 Thread Bruno Wolff III
On Wed, Jan 26, 2005 at 23:12:25 +0100, PFC <[EMAIL PROTECTED]> wrote: > > How do you do a self-join on a subselect ? > > like > SELECT a.x+b.x FROM (subselect) a, (subselect) b WHERE a.id = b.id+10 > > but without performing the subselect twice >

[GENERAL] Return value of 'serial' column on insert

2005-01-26 Thread Madison Kelly
Hi all, I have several tables with an 'id' column which is a simple 'serial unique' type. Often when I insert a record the next thing I need is to add or edit another table elsewhere using the ID of the entry I just added. Currently what I do is: SELECT _id FROM ORDER BY _id DESC LIMIT 1;

Re: [GENERAL] Splitting queries across servers

2005-01-26 Thread Max
> > Wow. Your needs really *are* demanding. You might need to look into a > high-end server to meet those kinds of needs - Sun has some *very* > expensive hardware that can handle over 1/2TB of RAM, for example, and > Cray makes supercomputers (even more *very* expensive) which can handle > somew

Re: [GENERAL] Return value of 'serial' column on insert

2005-01-26 Thread Bruno Wolff III
On Thu, Jan 27, 2005 at 00:35:25 -0500, Madison Kelly <[EMAIL PROTECTED]> wrote: > Hi all, > > I have several tables with an 'id' column which is a simple 'serial > unique' type. Often when I insert a record the next thing I need is to > add or edit another table elsewhere using the ID of th

Re: [GENERAL] Splitting queries across servers

2005-01-26 Thread Max
> > We configured a slony1 cluster with a master and slave (both 7.4.6), and > used the slave to serve read-only queries thereby offloading some of the > work from the master database. > > This worked well for us. > > You could also take a look at pg_pool to distribute your load - but I > haven't