[GENERAL] Primary keys for companies and people

2006-02-02 Thread Michael Glaesemann
Hello, all! Recently there was quite a bit of discussion regarding surrogate keys and natural keys. I'm not interested in discussing the pros and cons of surrogate keys. What I'd like to find out are the different methods people actually use to uniquely identify companies and people

Re: [GENERAL] Primary keys for companies and people

2006-02-02 Thread Leif B. Kristensen
On Thursday 02 February 2006 09:05, Michael Glaesemann wrote: For people I'm more or less stumped. I can't think of a combination of things that I know I'll be able to get from people that I'll want to be able to add to the database. Starting off we'll have at least 7,000 individuals in the

Re: [GENERAL] storing XML and querying

2006-02-02 Thread Richard Huxton
Matthew Terenzio wrote: I'm looking into methods to store XML docs for query and retrieval across all the docs or subsets. I've looked over a couple of options and may end up creating relations with the data. Are there any Super solutions that I might be overlooking. Also, this article

[GENERAL] NULL values and string

2006-02-02 Thread Sergey Karin
Hi, List! I'm using PG8.1. Are there any abilities to represent NULL values as string? I'm doing something like this: create function func(int4) returns varchar as' declare num_value alias for $1; string_value varchar; begin string_value := \'input value = \' || num_value; return

Re: [GENERAL] NULL values and string

2006-02-02 Thread Tino Wildenhain
Sergey Karin schrieb: Hi, List! I'm using PG8.1. Are there any abilities to represent NULL values as string? I'm doing something like this: create function func(int4) returns varchar as' declare num_value alias for $1; string_value varchar; begin string_value := \'input value =

Re: [GENERAL] NULL values and string

2006-02-02 Thread Richard Huxton
Sergey Karin wrote: Hi, List! I'm using PG8.1. Are there any abilities to represent NULL values as string? Null isn't a real value. Try not to think of it as a value. http://archives.postgresql.org/pgsql-sql/2003-01/msg00222.php num_value alias for $1; string_value := \'input

Re: [GENERAL] Primary keys for companies and people

2006-02-02 Thread David Goodenough
On Thursday 02 February 2006 09:07, Leif B. Kristensen wrote: On Thursday 02 February 2006 09:05, Michael Glaesemann wrote: For people I'm more or less stumped. I can't think of a combination of things that I know I'll be able to get from people that I'll want to be able to add to the

[GENERAL] Indexes again

2006-02-02 Thread Silas Justiniano
Sorry, I'll remake (rewrite? redo? ... bad English :/ ) my question: I have Books, Authors and Intermediate table. At intermediate I'm currently using the following indexes: CREATE INDEX authorIndex ON Intermediate(author_id); CREATE INDEX bookIndex ON Intermediate(book_id); I need a

Re: [GENERAL] Indexes again

2006-02-02 Thread Richard Huxton
Silas Justiniano wrote: Sorry, I'll remake (rewrite? redo? ... bad English :/ ) my question: I have Books, Authors and Intermediate table. At intermediate I'm currently using the following indexes: CREATE INDEX authorIndex ON Intermediate(author_id); CREATE INDEX bookIndex ON

[GENERAL] plpgsql parameters

2006-02-02 Thread FERREIRA, William (VALTECH)
Hi, i have a recursive function building a xml file, from differents table. the xml is stored in memory and then flush on disk. the xml text is used in each recursive calls and i would like to know if in plpqsql parameters are passed by reference, or if there is a key word for passing

Re: [GENERAL] Indexes again

2006-02-02 Thread Silas Justiniano
I know understand. Thank you ;) On 2/2/06, Richard Huxton dev@archonet.com wrote: Silas Justiniano wrote: Sorry, I'll remake (rewrite? redo? ... bad English :/ ) my question: I have Books, Authors and Intermediate table. At intermediate I'm currently using the following indexes:

Re: [GENERAL] plpgsql parameters

2006-02-02 Thread Richard Huxton
FERREIRA, William (VALTECH) wrote: Hi, i have a recursive function building a xml file, from differents table. the xml is stored in memory and then flush on disk. the xml text is used in each recursive calls and i would like to know if in plpqsql parameters are passed by reference, I don't

Re: [GENERAL] NULL values and string

2006-02-02 Thread Berend Tober
Richard Huxton wrote: Sergey Karin wrote: Are there any abilities to represent NULL values as string? Null isn't a real value. Try not to think of it as a value. That being said, and with due credit elsewhere (http://www.varlena.com/varlena/GeneralBits/84.php), what I do is CREATE OR

Re: [GENERAL] Best way to handle table trigger on update

2006-02-02 Thread Justin Pasher
-Original Message- From: Sven Willenberger [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 2:13 PM To: Justin Pasher Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Best way to handle table trigger on update On Tue, 2006-01-31 at 13:45 -0600, Justin Pasher

Re: [GENERAL] Best way to handle table trigger on update

2006-02-02 Thread Sven Willenberger
On Thu, 2006-02-02 at 08:58 -0600, Justin Pasher wrote: -Original Message- From: Sven Willenberger [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 2:13 PM To: Justin Pasher Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Best way to handle table trigger on

Re: [GENERAL] Best way to handle table trigger on update

2006-02-02 Thread Sven Willenberger
On Thu, 2006-02-02 at 10:16 -0500, Sven Willenberger wrote: On Thu, 2006-02-02 at 08:58 -0600, Justin Pasher wrote: -Original Message- From: Sven Willenberger [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 2:13 PM To: Justin Pasher Cc:

[GENERAL] How to find release notes

2006-02-02 Thread Russ Brown
Hi, I'm looking at www.postgrsql.org and wondering how to find the release notes for 8.1.2. I can see the link for the 8.1.2 release, but that just links to a directory of the release tarballs. Actually, all that would be needed here would be a text file in that directory containing the release

Re: [GENERAL] How to find release notes

2006-02-02 Thread Adam Witney
On 2/2/06 3:56 pm, Russ Brown [EMAIL PROTECTED] wrote: Hi, I'm looking at www.postgrsql.org and wondering how to find the release notes for 8.1.2. I can see the link for the 8.1.2 release, but that just links to a directory of the release tarballs. Actually, all that would be needed

Re: [GENERAL] How to find release notes

2006-02-02 Thread Adam Witney
On 2/2/06 4:06 pm, Russ Brown [EMAIL PROTECTED] wrote: Ah, there is it. Thanks! Just me not looking hard enough. However, I would argue that I shouldn't have to look so hard. I instinctively went for the 8.1.2 release link, and I think there should be a link to the release notes right there

Re: [GENERAL] How to find release notes

2006-02-02 Thread Russ Brown
On Thu, 02 Feb 2006 16:15:43 + Adam Witney [EMAIL PROTECTED] wrote: On 2/2/06 4:06 pm, Russ Brown [EMAIL PROTECTED] wrote: Ah, there is it. Thanks! Just me not looking hard enough. However, I would argue that I shouldn't have to look so hard. I instinctively went for the 8.1.2

Re: [GENERAL] Alternative to knoda, kexi and rekall?

2006-02-02 Thread Michelle Konzack
Am 2006-01-30 10:30:42, schrieb Cristian Prieto: What about PgAdmin III, I know, it is now perfect but I prefer it a lot against similar commercial products. It is not availlable as a Debian-Package. ;-) Really, I have long time looking for a product with the same specs. Me to. It would be

Re: [GENERAL] Alternative to knoda, kexi and rekall?

2006-02-02 Thread Michelle Konzack
Am 2006-01-30 20:04:43, schrieb Peter Eisentraut: Michelle Konzack wrote: Design a Database with OO2? code Functions? I'm not sure about what kind of function coding support you have in mind, but certainly you can design a database with it. Is this like the Adabase Add-on of StarOffice

Re: [GENERAL] Alternative to knoda, kexi and rekall?

2006-02-02 Thread Juan Jose Comellas
PgAdmin III is available on Debian. Its package name is pgadmin3. Try doing: apt-cache show pgadmin3 On Wed February 1 2006 20:06, Michelle Konzack wrote: Am 2006-01-30 10:30:42, schrieb Cristian Prieto: What about PgAdmin III, I know, it is now perfect but I prefer it a lot against

[GENERAL] dependencies between objects

2006-02-02 Thread Toni Casueps
I have got some views (for example view B) that use another views (for example view A) in the FROM clause. If I want to change view A, and it doesn't allow me to (for example adding a new column), another way would be dropping A and recreating it with the new column, but it doesn't allow me

Re: [GENERAL] dependencies between objects

2006-02-02 Thread Richard Huxton
Toni Casueps wrote: I have got some views (for example view B) that use another views (for example view A) in the FROM clause. If I want to change view A, and it doesn't allow me to (for example adding a new column), another way would be dropping A and recreating it with the new column, but

Re: [GENERAL] Alternative to knoda, kexi and rekall?

2006-02-02 Thread Magnus Hagander
What about PgAdmin III, I know, it is now perfect but I prefer it a lot against similar commercial products. It is not availlable as a Debian-Package. ;-) Yes, it is. http://www.pgadmin.org/download/debian.php //Magnus ---(end of

Re: [GENERAL] Alternative to knoda, kexi and rekall?

2006-02-02 Thread Peter Eisentraut
Michelle Konzack wrote: Is this like the Adabase Add-on of StarOffice 5.2 ? I don't know what that is. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] How to find release notes

2006-02-02 Thread Peter Eisentraut
Russ Brown wrote: Yes, and that's fantastic because it's very clear and easy to find. However, it's for 8.1 only. I was looking for 8.1.2 specifically. I suppose what I'm saying is that for someone who isn't familiar with the layout of the site it's a bit difficult to find the release notes

Re: [GENERAL] Primary keys for companies and people

2006-02-02 Thread Martijn van Oosterhout
On Thu, Feb 02, 2006 at 10:36:54AM +, David Goodenough wrote: Still, I'm struggling with the basic concept of /identity/, eg. is the William Smith born to John Smith and Jane Doe in 1733, the same William Smith who marries Mary Jones in the same parish in 1758? You may never really

[GENERAL] question about MAKE_EXPIRED_TUPLES_VISIBLE

2006-02-02 Thread Tony Caduto
I saw some where that if I recompiled my server with MAKE_EXPIRED_TUPLES_VISIBLE I would be able to see deleted rows? I did a ./configure --enable-MAKE_EXPIRED_TUPLES_VISIBLE It compiled ok but I dont see the deleted tuples ---(end of

Re: [GENERAL] question about MAKE_EXPIRED_TUPLES_VISIBLE

2006-02-02 Thread Tom Lane
Tony Caduto [EMAIL PROTECTED] writes: I saw some where that if I recompiled my server with MAKE_EXPIRED_TUPLES_VISIBLE I would be able to see deleted rows? If you aren't a certified wizard you do NOT want to turn that on, because it will very probably help you make things worse. My opinion on

Re: [GENERAL] question about MAKE_EXPIRED_TUPLES_VISIBLE

2006-02-02 Thread Tony Caduto
Tom Lane wrote: Tony Caduto [EMAIL PROTECTED] writes: I saw some where that if I recompiled my server with MAKE_EXPIRED_TUPLES_VISIBLE I would be able to see deleted rows? If you aren't a certified wizard you do NOT want to turn that on, because it will very probably help you make

Re: [GENERAL] Primary keys for companies and people

2006-02-02 Thread Ted Byers
- Original Message - From: Leif B. Kristensen [EMAIL PROTECTED] To: pgsql-general@postgresql.org Sent: Thursday, February 02, 2006 4:07 AM Subject: Re: [GENERAL] Primary keys for companies and people [snip] I'm very interested to hear what other use in their applications for holding

Re: [GENERAL] Primary keys for companies and people

2006-02-02 Thread Merlin Moncure
I should perhaps be posting this under another subject, but I feel that beneath the surface, Michael's problem and my own are strongly related. There is also the problem that a name can change. People change names by deed-poll, and also women can adopt a married name or keep their old one.

[GENERAL] Any way to extract records from the WAL?

2006-02-02 Thread Tony Caduto
Hi, I accidently deleted 2600 records. They are not super important but I would like to get them back. I copied the WAL file the deletes are in and I can see the text and dates from the records, they are all there. Is there a way to just extract the records without going through the whole

Re: [GENERAL] question about MAKE_EXPIRED_TUPLES_VISIBLE

2006-02-02 Thread Stephan Szabo
On Thu, 2 Feb 2006, Tony Caduto wrote: Tom Lane wrote: Tony Caduto [EMAIL PROTECTED] writes: I saw some where that if I recompiled my server with MAKE_EXPIRED_TUPLES_VISIBLE I would be able to see deleted rows? If you aren't a certified wizard you do NOT want to turn that on,

Re: [GENERAL] Primary keys for companies and people

2006-02-02 Thread Michael Glaesemann
On Feb 3, 2006, at 7:25 , Merlin Moncure wrote: There is also the problem that a name can change. People change names by deed-poll, and also women can adopt a married name or keep their old one. All in all an ID is about the only answer. I'll take the other side of this issue. The

[GENERAL] eqpg doesn't like bit fields

2006-02-02 Thread Noble, Robert
I get the following error from ecpg when it encounters a structure containing a bit field: ../../include/ecn_types.h:317: ERROR: syntax error at or near : The source it is complaining about is: 176 typedef enum{ 177 tifIOC = 0, 178 tifDay = 1, 179 tifGTX = 2,

[GENERAL] pgsql on win xp user permissions

2006-02-02 Thread Trans Porter
I want to setup a database that will be used by my php application. Right now I installed postgresql, I used an admin account to install it on a user account. So I can only access the database (like psql dbname) when i'm logged in as the user, if i try psql from admin it says fatal role admin

Re: [GENERAL] Can't get the field = ANY(array) clause to work...

2006-02-02 Thread nboutelier
The problem was fixed by initializing the array before giving it a value. Not surprising Postges isnt as popular as it should be. I was by luck that I found this out - the manual says nothing about init arrays. DECLARE id_var INTEGER[]; record_var RECORD; BEGIN id_var := '{}'; id_var[0]

Re: [GENERAL] Equivalent of a RECORD[] data type used in a function?

2006-02-02 Thread nboutelier
Oracle keeps looking more and more appealing. $$$ vs actually being able to get stuff done? ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] specifying unix domain socket name

2006-02-02 Thread aktivists
Is it possible to specify using PQsetdbLogin() or PQconnectdb() the name of unix domain socket? In documentation I read that I can specify path using host: host Name of the host to connect to. If this begins with a slash ('/'), it specifies Unix domain communication rather than TCP/IP

Re: [GENERAL] 8.0.3 regexp_replace()...

2006-02-02 Thread rlee0001
Stephan, How do IN and NOT IN treat NULLs? Don't these functions search an array for a specified value returning true or false? I guess the intuitive thing for IN and NOT IN to do would be to return NULL if NULL appears anywhere in the array since those elements values are unknown. Personally I

[GENERAL] C Language Stored Procedure Returning No Data

2006-02-02 Thread bfraci
We have a Java client that is using JDBC to communicate with the Postgres database. We have a stored procedure, foo, that is written in C which returns a byte array (bytea) to the Java client. This function takes in a couple of integers and based upon their values can return a byte array or no

[GENERAL] logging settings

2006-02-02 Thread Mott Leroy
On Postgres 7.4.1 I've been experiencing some strangeness with the logging settings in postgresql.conf. I turned on statement logging (and duration), issued a pg_ctl reload and got it working (logging to sys log and standard out). Now however, when i try to turn it off, it won't turn off,

Re: [GENERAL] Can't get the field = ANY(array) clause to work...

2006-02-02 Thread Bricklen Anderson
[EMAIL PROTECTED] wrote: The problem was fixed by initializing the array before giving it a value. Not surprising Postges isnt as popular as it should be. I was by luck that I found this out - the manual says nothing about init arrays. Instead of flippant comments like that, submit docs a

Re: [GENERAL] question about MAKE_EXPIRED_TUPLES_VISIBLE

2006-02-02 Thread Tony Caduto
Stephan Szabo wrote: I think something like CFLAGS=-D MAKE_EXPIRED_TUPLES_VISIBLE ./configure would be the way to get it. Thanks, I worked like a charm once I knew it was a CFLAG. I did the dump as plain text insert statements, verified the deleted records where there, then restored

Re: [GENERAL] C Language Stored Procedure Returning No Data

2006-02-02 Thread Michael Fuhr
On Wed, Feb 01, 2006 at 12:56:30PM -0500, [EMAIL PROTECTED] wrote: From a C stored procedure, how can I tell Postgres to pass on to the Java client that there is No Data? A zero length byte array or a null value is not the same as No Data. If you declare the function with RETURNS bytea then

Re: [GENERAL] PostgreSQL best practices?

2006-02-02 Thread Leonard Soetedjo
On Tuesday 31 January 2006 14:09, Jim C. Nasby wrote: At present time, your best bet is to drop in on the IRC channel and ask questions there. You'll normally get an immediate reply, even if it's just a URL to look at. As a beginner, I feel not knowing where to start and what to ask in IRC or

Re: [GENERAL] 8.0.3 regexp_replace()...

2006-02-02 Thread Stephan Szabo
On Wed, 1 Feb 2006, rlee0001 wrote: How do IN and NOT IN treat NULLs? Don't these functions search an array for a specified value returning true or false? I guess the intuitive thing for IN and NOT IN to do would be to return NULL if NULL appears anywhere in the array since those elements

Re: [GENERAL] Can't get the field = ANY(array) clause to work...

2006-02-02 Thread Stephan Szabo
On Thu, 2 Feb 2006 [EMAIL PROTECTED] wrote: The problem was fixed by initializing the array before giving it a value. Not surprising Postges isnt as popular as it should be. I was by luck that I found this out - the manual says nothing about init arrays. Well, I think that's in part because

Re: [GENERAL] 8.0.3 regexp_replace()...

2006-02-02 Thread Andrew - Supernews
On 2006-02-01, rlee0001 [EMAIL PROTECTED] wrote: Stephan, How do IN and NOT IN treat NULLs? Don't these functions search an array for a specified value returning true or false? I guess the intuitive thing for IN and NOT IN to do would be to return NULL if NULL appears anywhere in the array

Re: [GENERAL] pgsql on win xp user permissions

2006-02-02 Thread Chris
You'll need to create a separate psql user. See http://www.postgresql.org/docs/8.1/static/sql-createrole.html Then get your php script to connect with that username/password. Trans Porter wrote: I want to setup a database that will be used by my php application. Right now I installed

Re: [GENERAL] specifying unix domain socket name

2006-02-02 Thread Bruce Momjian
No, the name is .s.PGSQL.{port#}, and there is a lock file. Why do you want to specify a different name? --- [EMAIL PROTECTED] wrote: Is it possible to specify using PQsetdbLogin() or PQconnectdb() the name of unix

[GENERAL] Logging queries

2006-02-02 Thread Madison Kelly
Hi all, I've got a machine I am setting up (read; low volume atm). I need a way to log all the queries made to Postgres (just for a short time). I've got a problem with a 3rd party program (OSS, but I'm not 'let' enough to trace it) and I am hoping to help fix the problem by being able

Re: [GENERAL] Logging queries

2006-02-02 Thread Madison Kelly
Madison Kelly wrote: Hi all, I've got a machine I am setting up (read; low volume atm). I need a way to log all the queries made to Postgres (just for a short time). I've got a problem with a 3rd party program (OSS, but I'm not 'let' enough to trace it) and I am hoping to help fix the

Solved: Re: [GENERAL] Logging queries

2006-02-02 Thread Madison Kelly
Madison Kelly wrote: Madison Kelly wrote: Hi all, I've got a machine I am setting up (read; low volume atm). I need a way to log all the queries made to Postgres (just for a short time). I've got a problem with a 3rd party program (OSS, but I'm not 'let' enough to trace it) and I am

Re: [GENERAL] Primary keys for companies and people

2006-02-02 Thread Mark Dilger
Michael Glaesemann wrote: Hello, all! Recently there was quite a bit of discussion regarding surrogate keys and natural keys. I'm not interested in discussing the pros and cons of surrogate keys. What I'd like to find out are the different methods people actually use to uniquely identify

[GENERAL] Automating backup

2006-02-02 Thread Richard Sydney-Smith
I would like each database to encapsulate its own backup procedure. Each database contains a table (fsyslog) which has a record of each backup taken: rowidOperatortimestampdestination path At the application level I presently a) check for time since the last backup b) if older than x hrs

[GENERAL] Automating Backup

2006-02-02 Thread Richard Sydney-Smith
I presently use the following to export the database and as per my earleir post hope to have an equivent to do the backup as per: a) check for time since the last backup b) if older than x hrs (i) perform a vacuum analyze (ii) force a call to dbbackup (iii) add a new record into

Re: [GENERAL] logging settings

2006-02-02 Thread Michael Fuhr
On Thu, Feb 02, 2006 at 06:19:53PM -0500, Mott Leroy wrote: On Postgres 7.4.1 That's pretty old. If you can't upgrade to 8.0 or 8.1 then at least consider staying up to date with bug fixes by using the latest version in the 7.4 branch (currently 7.4.11). I've been experiencing some

Re: [GENERAL] PostgreSQL best practices?

2006-02-02 Thread Bruce Momjian
Read the FAQ. --- Leonard Soetedjo wrote: On Tuesday 31 January 2006 14:09, Jim C. Nasby wrote: At present time, your best bet is to drop in on the IRC channel and ask questions there. You'll normally get an immediate

Re: [GENERAL] logging settings

2006-02-02 Thread Tom Lane
Mott Leroy [EMAIL PROTECTED] writes: I turned on statement logging (and duration), issued a pg_ctl reload and got it working (logging to sys log and standard out). Now however, when i try to turn it off, it won't turn off, using the same procedure. I've now commented out all the lines

Re: [GENERAL] PostgreSQL best practices?

2006-02-02 Thread Leonard Soetedjo
On Friday 03 February 2006 13:02, Bruce Momjian wrote: Read the FAQ. Thanks. Somehow it slipped my mind to go to PostgreSQL's FAQ :P Regards, Leonard Soetedjo ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [GENERAL] eqpg doesn't like bit fields

2006-02-02 Thread Michael Meskes
Am Mittwoch, 1. Februar 2006 15:46 schrieb Noble, Robert: I get the following error from ecpg when it encounters a structure containing a bit field: ... A quick guess would be that the parser simply doesn't know this syntax. I'll have a look at it. Michael -- Michael Meskes Email: Michael

[GENERAL] News from IBM (DB2)

2006-02-02 Thread Nicolay A Vasiliev
Hello there! http://news.zdnet.co.uk/software/0,39020381,39249666,00.htm What do you think about this? Nicolay ---(end of broadcast)--- TIP 6: explain analyze is your friend