Re: [GENERAL] User defined data type

2006-04-04 Thread Don Y
Tom Lane wrote: Martijn van Oosterhout writes: On Thu, Mar 30, 2006 at 11:51:41AM -0700, Don Y wrote: - Can *_in() be ever invoked with a NULL argument? Or, can I safely assume that the pointer I am passed is valid? You can't get a NULL there. Yes, the pointer is valid cstring. Yes, STRI

Re: [GENERAL] User defined data type

2006-04-04 Thread Don Y
Martijn van Oosterhout wrote: On Thu, Mar 30, 2006 at 11:51:41AM -0700, Don Y wrote: [snipped questions and answers] Thanks! - Wish list item: errdetail(va_list arg) et al. functions (Yeah, I can write my own... but it would be nice if this was part of the error reporting routines). C

Re: [GENERAL] RAISE function misuse ?

2006-04-04 Thread Michael Fuhr
On Mon, Apr 03, 2006 at 05:44:18PM +0200, Patrick Refondini wrote: > idns_target=# select test(); > INFO: hello ! > CONTEXT: SQL statement "SELECT hello()" > PL/pgSQL function "test" line 2 at perform [...] > 1. Is there anything wrong using RAISE this way. Not in the sense of the code doing

Re: [GENERAL] CREATE TABLE (with INHERITS) and ACCESS EXCLUSIVE locks

2006-04-04 Thread Tom Lane
"Thomas F. O'Connell" <[EMAIL PROTECTED]> writes: > I've brought this up to an extent in the past, but is there an easy > way to extend section 12.3.1 (or create some form of appendix) such > that it reveals all possible locking paths for SQL commands in > postgres? It's very simple: any for

Re: [GENERAL] Duda, version para Solaris 10

2006-04-04 Thread Jonel Rienton
Yes there is, we have it in Blastwave.org, current version is 8.1.3; you also have the option of building it from source. And if you have tried Solaris 5.11 (solaris express), they have actually included it in the distribution. On 4/3/06, Juan Carlos <[EMAIL PROTECTED]> wrote: > > > Necesito sabe

Re: [GENERAL] CREATE TABLE (with INHERITS) and ACCESS EXCLUSIVE locks

2006-04-04 Thread Thomas F. O'Connell
On Apr 4, 2006, at 4:53 PM, Tom Lane wrote: "Thomas F. O'Connell" <[EMAIL PROTECTED]> writes: As for how this plays out in the real world, a pg_dumpall will start and run for a few hours. Sometime during that, this function might get called. When it does, an ACCESS EXCLUSIVE lock is held again

Re: [GENERAL] recover from base directory?

2006-04-04 Thread Alan Hodgson
On April 4, 2006 03:52 pm, "patrick" <[EMAIL PROTECTED]> wrote: > hi, > > just found about recovery.conf ? should i use it or in my case not having > data/global doesn't help. > recovery.conf is used to recover from a PITR backup. If you haven't been making PITR backups (which is only possible a

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
hi, just found about recovery.conf ? should i use it or in my case not having data/global doesn't help. pat ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL

Re: [GENERAL] Spurious rows returned with left join?

2006-04-04 Thread Edmund Bacon
Tom Lane wrote: Edmund Bacon <[EMAIL PROTECTED]> writes: Consider the following: ... Note that I get 2 rows where t1_a = 3. Are you getting a Merge Right Join plan for that? If so, you're likely getting bit by this bug: 2006-03-17 14:38 tgl That's correct. After doing an ana

Re: [GENERAL] CREATE TABLE (with INHERITS) and ACCESS EXCLUSIVE locks

2006-04-04 Thread Tom Lane
"Thomas F. O'Connell" <[EMAIL PROTECTED]> writes: > As for how this plays out in the real world, a pg_dumpall will start > and run for a few hours. Sometime during that, this function might > get called. When it does, an ACCESS EXCLUSIVE lock is held against > the table identified as t13, her

Re: [GENERAL] Spurious rows returned with left join?

2006-04-04 Thread Tom Lane
Edmund Bacon <[EMAIL PROTECTED]> writes: > Consider the following: > ... > Note that I get 2 rows where t1_a = 3. Are you getting a Merge Right Join plan for that? If so, you're likely getting bit by this bug: 2006-03-17 14:38 tgl * src/: backend/executor/nodeMergejoin.c, test

Re: [GENERAL] giving users access to specific databases

2006-04-04 Thread Courtenay Teska
> you should play around with phpPgAdmin for a while and let us know > specifically what we can help you with. I've managed to figure out how to fix most of my user access problems, but I'm still having trouble limiting the list of databases users see when they log in through phpPgAdmin. I notic

Re: [GENERAL] PSQL Data Type: text vs. varchar(n)

2006-04-04 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Jim Nasby <[EMAIL PROTECTED]> wrote: % Not sure if it's still true, but DB2 used to limit varchar to 255. I % don't think anyone limits it lower than that. Sybase: 254. Silently truncates. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED]

Re: [GENERAL] Cant find temp tables

2006-04-04 Thread sconeek
could be. i will have a look at the pgadmin site and see if i can find anything. but the pgadmin guys couldnt have missed this problem, seems to be pretty important functionality. thanks. ---(end of broadcast)--- TIP 6: explain analyze is your frien

[GENERAL] Not able to install PostgreSQL in my machine

2006-04-04 Thread Ravi Kumar
Hello,     I would like to install PostgreSQL on my system which is working with Windows XP operating system. I downloaded file - postgresql-8.1.3-1.zip from the web-site – extracted all files and started installation. At the end it is stopping and undoes the installation procedure by giving th

Re: [GENERAL] Change SERIAL to INTEGER

2006-04-04 Thread Pedro Monjo Florit
Pandurangan R S wrote: Hi, Is there any way to change a SERIAL type to an INTEGER? I think that it should be easy, since SERIAL is, in fact, an INTEGER with some conditions. There serial column is just a integer, with default as nextval from a sequence, so there is no neccessity to change the d

[GENERAL] Duda, version para Solaris 10

2006-04-04 Thread Juan Carlos
Necesito saber de favor, si existe alguna versionde PostgreSQL para Solaris 10.     I need to know if exists some PostgreSQL version for Solaris 10.     Gracias   Saludos

Re: [GENERAL] 8.1.3, libpq, PQprepare, plpgsql function, and partitioned tables

2006-04-04 Thread [EMAIL PROTECTED]
Stephen Frost wrote: > * Tom Lane ([EMAIL PROTECTED]) wrote: > > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > Am I correct in assuming that when Postgres prepared the SQL to execute > > > the "insert function" that the existing rules on the base table were > > > also resolved at that time?

Re: [GENERAL] how to create script of database in postgres..sql(winxp)

2006-04-04 Thread Michael Trausch
deepak pal wrote: > hi > i am trying to make script file for my database by using pg_dump in > windows as u say i open psql to postgres then a prompt postgres# open > then i write \i pg_dump it shows error.what should i do...plz hepl > \i in psql is for including a file to be read and

Re: [GENERAL] Why postgres install requires physical access to server in windows

2006-04-04 Thread Magnus Hagander
> Remote install of Postgres 8.1.3 using Windows installer > binary package is not working (says that console mode is > required) even when RDP client is started with > > mstsc /console > > switch. It should work fine with this switch. I've used it many times. > However, using installer pack

Re: [GENERAL] error message on http://techdocs.postgresql.org/ during redirect

2006-04-04 Thread Magnus Hagander
> If I click on a link while on the > http://techdocs.postgresql.org/ site, for example, under > "Quick Reference Material", "PostgreSQL Notes", I briefly > see an error message that says: "Notice: Use of undefined > constant userid > - assumed 'userid' in > /usr/local/www/techdocs.postgresql

[GENERAL] Why postgres install requires physical access to server in windows

2006-04-04 Thread Andrus
Remote install of Postgres 8.1.3 using Windows installer binary package is not working (says that console mode is required) even when RDP client is started with mstsc /console switch. However, using installer package, creating cluster and server process manually works OK from RDP client! Any id

[GENERAL] error message on http://techdocs.postgresql.org/ during redirect

2006-04-04 Thread SCassidy
If I click on a link while on the http://techdocs.postgresql.org/ site, for example, under "Quick Reference Material", "PostgreSQL Notes", I briefly see an error message that says: "Notice: Use of undefined constant userid - assumed 'userid' in /usr/local/www/techdocs.postgresql.org/technotes/re

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
hi tom, thank you for your answer! i am very happy that i will not need the global directory cause i really don't have it (too many bad sectors). is the problem of having no relations founds with psql mydb1 \d related to setting the next oid, next transaction id and WAL starting address with

Re: [GENERAL] recover from base directory?

2006-04-04 Thread Tom Lane
"patrick" <[EMAIL PROTECTED]> writes: > some update... but still not working. so to resume i have base / pg_xlog (2 > files and archives dir.) / pg_clog - BUT no global. i reinstalled postgresql > 8.0.4 (same version of my backup data/). initdb, createdb mydb1, mydb2 mydb3 > and move pg_xlog and

Fw: [GENERAL] PostgreSQL support on Redhat Advance Server 2.1

2006-04-04 Thread MargaretGillon
Thanks to everyone who answered my question so quickly. *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Margaret Gillon, IS Dept., Chromalloy Los Angeles, ext. 297 - Forwarded by Margaret Gillon/CLA/Chromalloy on 04/04/2006 12:52 PM - "Stock, Stuart" <[EM

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
some update... but still not working. so to resume i have base / pg_xlog (2 files and archives dir.) / pg_clog - BUT no global. i reinstalled postgresql 8.0.4 (same version of my backup data/). initdb, createdb mydb1, mydb2 mydb3 and move pg_xlog and _clog over the data. rename my base to fit th

Re: [GENERAL] sort a referenced list

2006-04-04 Thread Matthew Peter
Tom Lane <[EMAIL PROTECTED]> wrote: Matthew Peter writes:> What I'm trying to do is create a function that accepts a list then sorts and groups the values (like in sql)... I will have an unique list I can convert it to an array later or leave it a listThere is no "list" data structure in SQL.

Re: [GENERAL] CREATE TABLE (with INHERITS) and ACCESS EXCLUSIVE locks

2006-04-04 Thread Thomas F. O'Connell
On Apr 4, 2006, at 12:53 AM, Tom Lane wrote: "Thomas F. O'Connell" <[EMAIL PROTECTED]> writes: I'm dealing with an application that can potentially do ad hoc DDL. It uses a PG/pgSQL function, and the only DDL statements in the function are CREATE TABLE and CREATE INDEX statements. But I'm noti

Re: [GENERAL] giving users access to specific databases

2006-04-04 Thread Kenneth Downs
[EMAIL PROTECTED] wrote: you should play around with phpPgAdmin for a while and let us know specifically what we can help you with. in pg_hba.conf you can set it so that users have access to any database if they are in a group (or do we say "role" now?) that has the same

Re: [GENERAL] PostgreSQL support on Redhat Advance Server 2.1

2006-04-04 Thread Tony Caduto
> You wrote "Unfortunately Red Hat's backwards-compatibility policy > forbids dropping > new major PG releases into old RHEL branches". So that means I cannot > upgrade to Postgresql 8.x on a RedHat9 server? Currently I am using > Postgresql 7.3 but was planning on upgrading before I put the databa

Re: [GENERAL] PostgreSQL support on Redhat Advance Server 2.1

2006-04-04 Thread Scott Marlowe
On Tue, 2006-04-04 at 11:38, [EMAIL PROTECTED] wrote: > Hi Tom, > > You wrote "Unfortunately Red Hat's backwards-compatibility policy > forbids dropping > new major PG releases into old RHEL branches". So that means I cannot > upgrade to Postgresql 8.x on a RedHat9 server? Currently I am using > P

Re: [GENERAL] PostgreSQL support on Redhat Advance Server 2.1

2006-04-04 Thread MargaretGillon
Hi Tom, You wrote "Unfortunately Red Hat's backwards-compatibility policy forbids dropping new major PG releases into old RHEL branches". So that means I cannot upgrade to Postgresql 8.x on a RedHat9 server? Currently I am using Postgresql 7.3 but was planning on upgrading before I put the databa

[GENERAL] Spurious rows returned with left join?

2006-04-04 Thread Edmund Bacon
I think I have stumbled on a bug, though I'm not entirely sure about that. Things do seem to get a little fuzzy when using outer joins Consider the following: create table t1(t1_a int); insert into t1 values (1); insert into t1 values (2); insert into t1 values (3); create table t2(t2_

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
hi again, the postgresql version i was using before the crash was 8.0.4 - i still don't have the global directory. pat ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] giving users access to specific databases

2006-04-04 Thread postgresql
> you should play around with phpPgAdmin for a while and let us know > specifically what we can help you with. I've managed to figure out how to fix most of my user access problems, but I'm still having trouble limiting the list of databases users see when they log in through phpPgAdmin. I notice

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
Looks promising. If you've also got the "global" directory then you should have everything you really need. i don't have the global directory... can i do something??? pat ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] MediaWiki and Postgresql?

2006-04-04 Thread Scott Marlowe
On Mon, 2006-04-03 at 06:36, Markus Wollny wrote: > Hi > > [EMAIL PROTECTED] wrote: > > > Has anyone put MediaWiki up using the current version of Postgresql? > > I have, although our Mediawiki installation is currently not openly > accessible. Can't say that it went like a breeze, but the obsta

Re: [GENERAL] Self-referencing and inherited table

2006-04-04 Thread Stephan Szabo
On Tue, 4 Apr 2006, Anastasios Hatzis wrote: > Hello! > > I want to realize some kind of parent-child relation with-in a table, > but have problems with foreign key / references. Probably this issue > occurs because I use inheritance (as implied by some pages, I found). Probably. If the matching

Re: [GENERAL] recover from base directory?

2006-04-04 Thread Tom Lane
"patrick" <[EMAIL PROTECTED]> writes: >> Only part of it. Can you find the pg_clog and pg_xlog directories? > [EMAIL PROTECTED] lost+found]# find . | grep pg_clog > ./#3044578/pg_clog > ./#3044578/pg_clog/ > ./#3044578/pg_clog/0001 > ./#3044578/pg_clog/0002 > (3 files) > [EMAIL PROTECTED] l

Re: [GENERAL] Grouping aggregate functions

2006-04-04 Thread Kai Hessing
Richard Connamacher wrote: > This came up with an error too, but it pointed me in the right > direction and was easy to fix. I needed to use an alias for the > entire subquery too, so what finally worked is this: > > SELECT avg(minprice) FROM > (SELECT min(price) AS minprice FROM weekly_

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
Only part of it. Can you find the pg_clog and pg_xlog directories? [EMAIL PROTECTED] lost+found]# find . | grep pg_clog ./#3044578/pg_clog ./#3044578/pg_clog/ ./#3044578/pg_clog/0001 ./#3044578/pg_clog/0002 (3 files) [EMAIL PROTECTED] lost+found]# find . | grep pg_xlog ./#3044578/pg_xlog

Re: [GENERAL] recover from base directory?

2006-04-04 Thread Tom Lane
"patrick" <[EMAIL PROTECTED]> writes: > 1) do backup always... on cd, tape, raid. my hd just burn. > there is hope for me, in lost+found there is a directory called base with > multiples sub-direcotry (403274 for example). is this my database, Only part of it. Can you find the pg_clog and pg_xl

Re: [GENERAL] sort a referenced list

2006-04-04 Thread Tom Lane
Matthew Peter <[EMAIL PROTECTED]> writes: > What I'm trying to do is create a function that accepts a list then sorts > and groups the values (like in sql)... I will have an unique list I can > convert it to an array later or leave it a list There is no "list" data structure in SQL. There a

Re: [GENERAL] recover from base directory?

2006-04-04 Thread patrick
hi again, my postgresql version for the base directory is: 8.0.4 now i have installed the last one, but of course if need be i can reinstall 8.0.4. thanks you! pat - Original Message - From: "patrick" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 04, 2006 3:45 AM Subject: [GENERA

Re: [GENERAL] functions behaviours

2006-04-04 Thread A. Kretschmer
am 04.04.2006, um 15:02:19 +0200 mailte [EMAIL PROTECTED] folgendes: > Hi All! > > I'm wondering if there is an elegant way to add simple behaviours to stored > Postgres functions. > > 1. First, what I want to get here is a function which orders their > results columns in ASC at one time and in

[GENERAL] functions behaviours

2006-04-04 Thread ycrux
Hi All! I'm wondering if there is an elegant way to add simple behaviours to stored Postgres functions. 1. First, what I want to get here is a function which orders their results columns in ASC at one time and in DESC next time it is called. Something like that: CREATE FUNCTION sort_swap(inte

Re: [GENERAL] database design questions

2006-04-04 Thread Ottavio Campana
hubert depesz lubaczewski wrote: > 2) do you think it's possible in a plpgsql procedure select the name of > a table into a variable and use that variable in the query? > possible, but not really good way. read about 'execute' in plpgsql. why isn't it good? I mean, from my point of view

[GENERAL] Self-referencing and inherited table

2006-04-04 Thread Anastasios Hatzis
Hello! I want to realize some kind of parent-child relation with-in a table, but have problems with foreign key / references. Probably this issue occurs because I use inheritance (as implied by some pages, I found). In the mailing list archive I couldn't find appropriate solutions, but maybe I

[GENERAL] Migrating data from Oracle 9i to PostgreSQL

2006-04-04 Thread krokodylek
Hi :-) I sure hope I'm asking in the right place... Is there any automated or semi-automated way of migrating data from Oracle database (9.2.0.4) to PostgreSQL one? I only need the data, nothing else (not stored procedures, indexes, etc.), the relations are pretty simple, for example: CREATE

Re: [GENERAL] Migrating data from Oracle 9i to PostgreSQL

2006-04-04 Thread Thomas Pundt
Hi, On Tuesday 04 April 2006 14:01, [EMAIL PROTECTED] wrote: | I sure hope I'm asking in the right place... | | Is there any automated or semi-automated way of migrating data from Oracle | database (9.2.0.4) to PostgreSQL one? | | I only need the data, nothing else (not stored procedures, indexes,

Re: [GENERAL] Migrating data from Oracle 9i to PostgreSQL

2006-04-04 Thread A. Kretschmer
am 04.04.2006, um 14:01:30 +0200 mailte [EMAIL PROTECTED] folgendes: > > Hi :-) > > I sure hope I'm asking in the right place... > > Is there any automated or semi-automated way of migrating data from Oracle > database (9.2.0.4) to PostgreSQL one? http://techdocs.postgresql.org/#convertfrom

[GENERAL] Migrating data from Oracle 9i to PostgreSQL

2006-04-04 Thread krokodylek
Hi :-) I sure hope I'm asking in the right place... Is there any automated or semi-automated way of migrating data from Oracle database (9.2.0.4) to PostgreSQL one? I only need the data, nothing else (not stored procedures, indexes, etc.), the relations are pretty simple, for example: CREATE T

Re: [GENERAL] database design questions

2006-04-04 Thread hubert depesz lubaczewski
On 4/3/06, Ottavio Campana <[EMAIL PROTECTED]> wrote: 1) The database I'm going to develop is  a big list with a catalog ofitems and I  want to  store subsets  of this  list representing  theavailable items in several places.My idea  is to create the  big table with  all the elements and  then to c

Re: [GENERAL] Performance Killer 'IN' ?

2006-04-04 Thread Kai Hessing
Kai Hessing wrote: >>> What do you mean with larger statistics target? >> >> See ALTER TABLE SET STATISTICS, or just change default_statistics_target >> and re-ANALYZE. > > Thanks, that definitly looks like a starting point. I will test it and > post my results. Btw. what happens if the estimatio

Re: [GENERAL] How can i import .backup file into the database

2006-04-04 Thread Peter Eisentraut
Am Dienstag, 4. April 2006 10:59 schrieb venu gopal: > I am trying to import tables from a file called choro.backup.I have > created a db called dhis.Is this not possible to import data from a .backup > file.If it is not possible then how can i import the data into my > database.Can you please

[GENERAL] How can i import .backup file into the database

2006-04-04 Thread venu gopal
Dear List,    I am trying to import tables from a file called choro.backup.I have created a db called dhis.Is this not possible to import data from a .backup file.If it is not possible then how can i import the data into my database.Can you please give me the steps how to import the data from a .ba

Re: [GENERAL] database design questions

2006-04-04 Thread Ottavio Campana
Alban Hertroys wrote: > Ottavio Campana wrote: > >>> CREATE TABLE person ( >>> id SERIAL, >>> name TEXT >>> ); > > >> how can I do it with a INT8 instead of a INT4? > > > Do you really expect that sequence to reach over 2 billion? Otherwise > I'd stick with the SERIAL, nothin

[GENERAL] recover from base directory?

2006-04-04 Thread patrick
hi all, 1) do backup always... on cd, tape, raid. my hd just burn. there is hope for me, in lost+found there is a directory called base with multiples sub-direcotry (403274 for example). is this my database, can i recover them with thoses directory? look in the archive for recover base... no

Re: [GENERAL] sort a referenced list

2006-04-04 Thread Matthew Peter
I'll help clarify exactly what I am trying to accomplish. What I'm trying to do is create a function that accepts a list then sorts and groups the values (like in sql)... I will have an unique list I can convert it to an array later or leave it a listI'd like to keep it simple and manipul