Re: [GENERAL] Foreign keys to inherited tables

2008-03-20 Thread Leon Mergen
On 3/20/08, Erik Jones <[EMAIL PROTECTED]> wrote: > I think he's talking about foreign keys from a "partitioned table", > i.e. a parent and all of its child tables, to another table. That > would, at first, sound simple, but scenarios like this make it tricky > as something to be handled automa

Re: [GENERAL] Problem with async notifications of table updates

2008-03-20 Thread Karsten Hilbert
On Wed, Mar 19, 2008 at 11:37:16AM +1030, Tyler, Mark wrote: > > Oh, you can, you can calculate the name of the NOTIFY dynamically > > in the trigger sending the notify, for example embedding a primary key > value. > > I don't understand how this can work. Surely my subscriber applications > hav

[GENERAL] aliases and set of record

2008-03-20 Thread Ivan Sergio Borgonovo
I'd like to use default param so I build up an alias of BasketItems create or replace function BasketItems( _BasketID bigint, _Split boolean, out _ItemID int, out _qty real ) as... create or replace function BasketItems( _BasketID bigint, out _ItemID int, out _qty real ) returns

Re: [GENERAL] [solved] aliases and set of record

2008-03-20 Thread Ivan Sergio Borgonovo
On Thu, 20 Mar 2008 13:41:39 +0100 Ivan Sergio Borgonovo <[EMAIL PROTECTED]> wrote: [snip] > for _row in > select _ItemID as __ItemID, _qty as __qty from > BasketItems(_BasketID,null) > loop ... -> for _row in select bi._ItemID as __ItemID, bi._qty as __qty from BasketItems(_Baske

Re: [GENERAL] Problem with async notifications of table updates

2008-03-20 Thread Martijn van Oosterhout
On Thu, Mar 20, 2008 at 12:40:46PM +0100, Karsten Hilbert wrote: > It's great fun to watch people from all across the globe > change data on test patients in our public test database. > The frontend is written to display such updates in realtime > (well, whatever it takes to get the notification de

Re: [GENERAL] tsearch2 in postgresql 8.3.1 - invalid byte sequence for encoding "UTF8": 0xc3

2008-03-20 Thread Martijn van Oosterhout
On Wed, Mar 19, 2008 at 07:55:40PM -0400, Tom Lane wrote: > (that's \303\240 or 0xc3 0xa0). I am thinking that something decided > the \240 was junk and removed it. Hmm, it is coincidently the space character +0x80, which is defined as a non-breaking space in many Latin encodings. Perhaps ctype d

Re: [GENERAL] Problem with async notifications of table updates

2008-03-20 Thread Karsten Hilbert
On Thu, Mar 20, 2008 at 02:08:13PM +0100, Martijn van Oosterhout wrote: > > It's great fun to watch people from all across the globe > > change data on test patients in our public test database. > > The frontend is written to display such updates in realtime > > (well, whatever it takes to get the

[GENERAL] OSCON PostgreSQL Day July 20, 2008 - Save the date!

2008-03-20 Thread Selena Deckelmann
Save The Date: OSCON PostgreSQL Day PostgreSQL community, The O'Reilly Open Source Conference 2008 schedule will soon be revealed, and some of you -- especially those speaking -- will be making your travel arrangements to visit Portland. But, wait! Before you buy your plane tickets, you'd bette

Re: [GENERAL] Function Returning SETOF RECORD: Trouble With Char Type

2008-03-20 Thread Angus B. Atkins-Trimnell
Thanks a lot. I missed your post when it first came up, but I just tried double-quoting the type indicator and it worked like a charm! --Angus Tom Lane wrote: "Angus B. Atkins-Trimnell" <[EMAIL PROTECTED]> writes: I am having trouble with a function designed to return all column constrain

Re: [GENERAL] Row size overhead

2008-03-20 Thread Zubkovsky, Sergey
Thanks for your reply. I had used PG 8.3.1 on 32-bit WinXP platform. "PostgreSQL 8.3.1, compiled by Visual C++ build 1400" But I suppose this fact doesn't change anything essentially. Thanks, Sergey Zubkovsky -Original Message- From: Pavan Deolasee [mailto:[EMAIL PROTECTED] Sent: Wed

Re: [GENERAL] Row size overhead

2008-03-20 Thread Adrian Klaver
On Thursday 20 March 2008 7:24 am, Zubkovsky, Sergey wrote: > Thanks for your reply. > > I had used PG 8.3.1 on 32-bit WinXP platform. > "PostgreSQL 8.3.1, compiled by Visual C++ build 1400" > But I suppose this fact doesn't change anything essentially. > > Thanks, > Sergey Zubkovsky What you are

Re: [HACKERS] [GENERAL] tsearch2 in postgresql 8.3.1 - invalid byte sequence for encoding "UTF8": 0xc3

2008-03-20 Thread Tom Lane
Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > On Wed, Mar 19, 2008 at 07:55:40PM -0400, Tom Lane wrote: >> (that's \303\240 or 0xc3 0xa0). I am thinking that something decided >> the \240 was junk and removed it. > Hmm, it is coincidently the space character +0x80, which is defined as > a

[GENERAL] unexpected results with NOT IN query

2008-03-20 Thread Mason Hale
Hello -- I'm getting some unexpected results with a NOT IN query -- this is on 8.2.5. This is the query in question: prod_2=> select id from feed_download_task where id in (02466,141701504) and id not in (select last_feed_download_task_id from subscription); id (0 rows) This query re

Re: [GENERAL] unexpected results with NOT IN query

2008-03-20 Thread Tom Lane
"Mason Hale" <[EMAIL PROTECTED]> writes: > I'm getting some unexpected results with a NOT IN query -- this is on 8.2.5. If there are any NULLs in subscription.last_feed_download_task_id, that NOT IN will not behave the way you are expecting. You might want to filter the nulls out of the subselect

Re: [GENERAL] unexpected results with NOT IN query

2008-03-20 Thread Stephan Szabo
On Thu, 20 Mar 2008, Mason Hale wrote: > Hello -- > > I'm getting some unexpected results with a NOT IN query -- this is on 8.2.5. > > This is the query in question: > > prod_2=> select id from feed_download_task where id in (02466,141701504) > and id not in (select last_feed_download_task_id

[GENERAL] dynamically generated SQL and planner/performance

2008-03-20 Thread Ivan Sergio Borgonovo
I've a lot of code that should call different functions according to values in tables. something like: create table FuncName(Name varchar(10), arg int); insert into FuncName values('ciro',5); insert into FuncName values('pino',7); insert into FuncName values('nano',11); create or replace funct

Re: [GENERAL] Row size overhead

2008-03-20 Thread Zubkovsky, Sergey
In my test all 3358604 rows were inserted by single 'COPY FROM file' command. So it's obviously that each row has only one version. > For 8.2 onwards, the tuple header is > 23 bytes. Add another 4 bytes for one line pointer for each row. If you > have > null values, another 5 bytes for null bitma

[GENERAL] [postgis-users] how many min. floating-points?

2008-03-20 Thread John Smith
guys, how many min. floating-points must a server hardware support for postgresql+postgis? does postgresql+postgis do much floating-point math to make a difference? can someone give postgresql+postgis application examples that will require high floating-points? thks, jzs -- Sent via pgsql-general

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-20 Thread Colin Wetherbee
John Smith wrote: guys, Please don't cross-post, especially since nobody on the PostGIS mailing list answered your previous question. how many min. floating-points must a server hardware support for postgresql+postgis? does postgresql+postgis do much floating-point math to make a difference

[GENERAL] cast problem 8.3.1

2008-03-20 Thread Steve Clark
Hello List, I can't seem to figure out what is this code that worked on 7.4.x. I've added cast to everything but still get: postgres error log: ERROR: operator does not exist: text = integer HINT: No operator matches the given name and argument type(s). You might need to add explicit type c

[GENERAL] How can i connect my application dynamically to postgres schema.

2008-03-20 Thread Chetan Bob
Hello, How can i connect my application dynamically to postgres schema. Its like this 1)One database postgres 2) It has one database say 'Test' 3)Now i created some number of schema in it say test1, test2,test3 etc all have same same structure but different data 4)Now my web application shoul

Re: [GENERAL] Which JDBC version to use with PostgreSQL 8.1.11?

2008-03-20 Thread Bjørn T Johansen
On Thu, 20 Mar 2008 12:29:21 +0900 "- Edwin -" <[EMAIL PROTECTED]> wrote: > Hi, > > On Thu, Mar 20, 2008 at 6:17 AM, Bjørn T Johansen wrote: > > Should I use JDBC version 8.1 Build 412 with this database or > > is it recommended to use JDBC version 8.3 Build 603 > > or another version? > > Why

Re: [GENERAL] nntp not workiNG

2008-03-20 Thread Arturo Pérez
Who should I contact to bring this to their attention? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] cast problem 8.3.1

2008-03-20 Thread Rodrigo Gonzalez
Steve Clark escribió: Hello List, I can't seem to figure out what is this code that worked on 7.4.x. I've added cast to everything but still get: postgres error log: ERROR: operator does not exist: text = integer HINT: No operator matches the given name and argument type(s). You might need

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-20 Thread Stephen Woodbridge
John Smith wrote: guys, how many min. floating-points must a server hardware support for postgresql+postgis? does postgresql+postgis do much floating-point math to make a difference? can someone give postgresql+postgis application examples that will require high floating-points? thks, jzs I do

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-20 Thread Sam Mason
On Thu, Mar 20, 2008 at 02:02:12PM -0400, John Smith wrote: > how many min. floating-points must a server hardware support for > postgresql+postgis? does postgresql+postgis do much floating-point > math to make a difference? can someone give postgresql+postgis > application examples that will requi

Re: [GENERAL] nntp not workiNG

2008-03-20 Thread Magnus Hagander
Arturo Pérez wrote: Who should I contact to bring this to their attention? Marc Fouriner, [EMAIL PROTECTED] //Magnus -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] cast problem 8.3.1

2008-03-20 Thread Charles Simard
|> |> postgres error log: |> ERROR: operator does not exist: text = integer |> HINT: No operator matches the given name and argument type(s). You |> might need to add explicit type casts. |> STATEMENT: update T_MON_DEVICE_STATUS set device_ip = $1 :: inet |> , status = $2 :: integer

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-20 Thread Colin Wetherbee
Sam Mason wrote: On Thu, Mar 20, 2008 at 02:02:12PM -0400, John Smith wrote: how many min. floating-points must a server hardware support for postgresql+postgis? does postgresql+postgis do much floating-point math to make a difference? can someone give postgresql+postgis application examples tha

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-20 Thread Andrej Ricnik-Bay
On 21/03/2008, Colin Wetherbee <[EMAIL PROTECTED]> wrote: > Dunno about that. On the PostGIS list, he said: > > "i got an old box supporting only 1 floating-point" > > Maybe he means an FPU? *boggle* Maybe floating-point registers on the FPU? So many options! Cheers, Andrej -- Please don't

Re: [GENERAL] nntp not workiNG

2008-03-20 Thread Arturo Pérez
On Mar 19, 2008, at 11:18 AM, Martin Gainty wrote: what kind of errors are you experiencing? Saludos! Martin- Can't connect to news.us.postgresql.org -arturo -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.or

Re: [GENERAL] unexpected results with NOT IN query

2008-03-20 Thread Mason Hale
Thanks -- that was it -- last_feed_download_task_id can indeed be null. - Mason On Thu, Mar 20, 2008 at 10:17 AM, Stephan Szabo < [EMAIL PROTECTED]> wrote: > On Thu, 20 Mar 2008, Mason Hale wrote: > > > Hello -- > > > > I'm getting some unexpected results with a NOT IN query -- this is on > 8.2.

[GENERAL] createuser: could not connect to database postgres: FATAL: could not open file "global/pg_database": No such file or directory

2008-03-20 Thread Tri Quach
Hi All, I need your help to fix this problem. When I ran initdb, I got the warning error below. Then I tried to create a user. I got error "createuser: could not connect to database postgres: FATAL: could not open file "global/pg_database": No such file or directory". Please see the out

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-20 Thread Rick
In article <[EMAIL PROTECTED]>, Sam Mason <[EMAIL PROTECTED]> wrote: >I'm not quite sure if this would help your use case, but a few editors >allow you to send blocks of text to other processes. For example, under >Emacs I can hit Ctrl+C twice and it will grab the current paragraph >and send it o

Re: [GENERAL] createuser: could not connect to database postgres: FATAL: could not open file "global/pg_database": No such file or directory

2008-03-20 Thread Tom Lane
"Tri Quach" <[EMAIL PROTECTED]> writes: > createuser: could not connect to database postgres: FATAL: could not open > file "global/pg_database": No such file or directory So is that file present (under /var/lib/pgsql/data)? What messages are in the postmaster's logfile? What PG version is this,

Re: [GENERAL] Which JDBC version to use with PostgreSQL 8.1.11?

2008-03-20 Thread Kris Jurka
On Thu, 20 Mar 2008, Bj?rn T Johansen wrote: Ok, I just thought since the version says 8.1, 8.2 and 8.3 that this meant that jdbc version 8.1 should be used for db version 8.1, jdbc version 8.2 was meant for db 8.2, and so forth The version numbering is meant to indicate that for a 8.

Re: [GENERAL] createuser: could not connect to database postgres: FATAL: could not open file "global/pg_database": No such file or directory

2008-03-20 Thread Tri Quach
Thanks everyone for all your help. After reboot the server, I was able to recreate user and database. I am done with the installation. Thanks, Tri. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane Sent: Thursday, March 20, 2008 3:57 PM To:

[GENERAL] cursor manipulation

2008-03-20 Thread Justin
Cursor manipulation with select statements This is something i did in foxpro and wonder if it is at all possible in pl/pgSQL. I would create a cursor in foxpro then populate it with Inserts then after all that was done use a Select statement to do more manipulation if need be the Foxpro cod