Re: [GENERAL] Dumping in LATIN1 and restoring in UTF-8

2006-07-05 Thread Tino Wildenhain
Marco Bizzarri schrieb: Hi all. Here is my use case: I've an application which uses PostgreSQL as backend. Up to now, the database was encoded in SQL_ASCII or LATIN1. Now, we need to migrate to UTF-8. What we tried, was to: 1) dump the database using pg_dump, in tar format (we had blob); 2) mo

Re: [GENERAL] basic log question

2006-07-05 Thread Angshu Kar
Thanks Chris. I;ll try that tomorrow On 7/5/06, Chris <[EMAIL PROTECTED]> wrote: Angshu Kar wrote:> Hi,>> Could anyone please let me know how can I view the pgsql log? > A week back everything was ok but today I open my db and see many data> deleted.> Can I view when this happened?If logging is ena

Re: [GENERAL] Granting COPY FROM access

2006-07-05 Thread Chris
Jim Cser wrote: [post header corrected, sorry] I have an application that uses ODBC to access a PostGreSQL 8.0.3 database. To load in text files (comma separated, with column headers), I use the SQL statement COPY FROM, which requires me to be a superuser. I don't need full superuser access, s

Re: [GENERAL] basic log question

2006-07-05 Thread Chris
Angshu Kar wrote: Hi, Could anyone please let me know how can I view the pgsql log? A week back everything was ok but today I open my db and see many data deleted. Can I view when this happened? If logging is enabled, then sure. You'll need to check the postgresql.conf file to see where the

[GENERAL] Granting COPY FROM access

2006-07-05 Thread Jim Cser
[post header corrected, sorry] I have an application that uses ODBC to access a PostGreSQL 8.0.3 database. To load in text files (comma separated, with column headers), I use the SQL statement COPY FROM, which requires me to be a superuser. I don't need full superuser access, so I would like to

[GENERAL] Granting COPY TO access

2006-07-05 Thread Jim Cser
I have an application that uses ODBC to access a PostGreSQL 8.0.3 database. To load in text files (comma separated, with column headers), I use the SQL statement COPY FROM, which requires me to be a superuser. I don't need full superuser access, so I would like to restrict the permissions to only

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread John DeSoi
On Jul 5, 2006, at 5:41 PM, Bjørn T Johansen wrote: btw, just one more thing... If I join two or more tables, which type should I use for the "into" variable (select into t2 *...) where t2 would contain fields from more than one table? I guess using "t2 some_table%rowtype" won't work when

Re: [GENERAL] High-Availability Question

2006-07-05 Thread Chander Ganesan
Ivan Zolotukhin wrote: Hello, > Third idea: > I install the Slony-I, linux-ha and postgresql on the same server of > the two 2U servers. The web application access to the db server > directly and without pgpool. AFAIK, Slony does not have failover capabilities you need in HA solution: http:/

Re: RES: [GENERAL] Phantom groups

2006-07-05 Thread Chris
Carlos H. Reimer wrote: Sorry, I would like to say pg_dumpall and not pg_dump. --no-privileges is an option but I need to restore the privileges. There are a lot of them in the system, many many objects and privileges. pg_dumpall *does* dump all the permissions properly. What options / switch

Re: [GENERAL] How do I revoke CREATE TABLE and other privileges?

2006-07-05 Thread Michael Fuhr
On Wed, Jul 05, 2006 at 02:27:19PM -0700, Karen Hill wrote: > I would like for one role to be able to login, and execute a couple of > functions and nothing else. I've tried to revoke access to CREATE on > the database, schema, and tablespace but when I tested it, the user was > still allowed to c

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread Bjørn T Johansen
btw, just one more thing... If I join two or more tables, which type should I use for the "into" variable (select into t2 *...) where t2 would contain fields from more than one table? I guess using "t2 some_table%rowtype" won't work when joining tables? BTJ On Wed, 5 Jul 2006 16:32:10 -0400 J

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread Bjørn T Johansen
That looks like the features I am looking for... I'll check it out more tomorrow, thx... :) BTJ On Wed, 5 Jul 2006 16:32:10 -0400 John DeSoi <[EMAIL PROTECTED]> wrote: > > On Jul 5, 2006, at 3:51 PM, Bjørn T Johansen wrote: > > > Yes, but I need to return n fields from one table and n fiels f

[GENERAL] How do I revoke CREATE TABLE and other privileges?

2006-07-05 Thread Karen Hill
I would like for one role to be able to login, and execute a couple of functions and nothing else. I've tried to revoke access to CREATE on the database, schema, and tablespace but when I tested it, the user was still allowed to create tables. regards, ---(end of broadca

Re: [GENERAL] Null and Void() - Or, Abandon All Hope Ye Who allow

2006-07-05 Thread Wayne Conrad
All good points. The ability to store NULL, and the fact that there is just one kind of NULL, seem to parallel what has become common and useful in programming languages. Most support NULL at least for pointers, and many support it for all data types. It doesn't have to have a defined meaning to

Re: [GENERAL] Null and Void() - Or, Abandon All Hope Ye Who allow

2006-07-05 Thread Chris Browne
[EMAIL PROTECTED] (Greg Stark) writes: > Scott Marlowe <[EMAIL PROTECTED]> writes: > >> However, there are often nulls that fall in the category of "who >> cares?" For those, null is a perfectly acceptable alternative, and >> there's no need for all the extra work. > > There is often a need for sp

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread John DeSoi
On Jul 5, 2006, at 3:51 PM, Bjørn T Johansen wrote: Yes, but I need to return n fields from one table and n fiels from another, and n fields from yet another table, etc... and return this as some kind of record... How do I to this? Create a type. Something like create type my_type as (i1

Re: [GENERAL] Form builder?

2006-07-05 Thread Kenneth Downs
[EMAIL PROTECTED] wrote: So far, here are the candidates: Andromeda, Lazarus, and Rekall. I was probably fairly inarticulate in my first post, but none of these seem to meet my criteria for automatic generation of forms based on the database definition. Most of the above frameworks have a goo

[GENERAL] basic log question

2006-07-05 Thread Angshu Kar
Hi,Could anyone please let me know how can I view the pgsql log?A week back everything was ok but today I open my db and see many data deleted.Can I view when this happened?Thanks,AK

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread Bjørn T Johansen
Yes, but I need to return n fields from one table and n fiels from another, and n fields from yet another table, etc... and return this as some kind of record... How do I to this? BTJ On Wed, 5 Jul 2006 19:13:39 +0200 Dany De Bontridder <[EMAIL PROTECTED]> wrote: > On Wednesday 05 July 2006 16

Re: [GENERAL] User privileges in web database applications

2006-07-05 Thread Kenneth Downs
Antonis Christofides wrote: But I think that checking user privileges at the database level is better. I think it's simpler and more secure, and if later you also want to create nonweb apps, you won't have any more authentication/privilege headaches. Couldn't agree more. But consider this r

Re: [GENERAL] [JDBC] Is what I want possible and if so how?

2006-07-05 Thread Jochem van Dieten
Csaba Nagy wrote: On Mon, 2006-07-03 at 17:03, Tom Lane wrote: status and TX2's select will not return the row. This isn't entirely perfect because LIMIT acts before FOR UPDATE: TX2's select will return nothing, rather than selecting the next available row as you might wish. So you might want t

Re: [GENERAL] Phantom groups

2006-07-05 Thread Scott Marlowe
On Tue, 2006-07-04 at 22:41, Chris wrote: > Carlos H. Reimer wrote: > > Hi, > > > > I´m planning to migrate from 7.4 to 8.0.7 and I discovered some strange > > behavior during migration. > > > > pg_dump inserted GRANT to phantom groups. They do not exist in pg_group; > > > > When the script crea

Re: [GENERAL] Notes on converting from MySQL 5.0.x to PostgreSQL

2006-07-05 Thread Chris Browne
[EMAIL PROTECTED] ("Jim C. Nasby") writes: >> Uh oh. I'm a little worried about writing tests based on GPLed code >> for Slony-I or other replication systems. Might these need to be >> clean-roomed? > > Is there actually a lack of ideas for our regression tests, or a lack of > people/motivation t

Re: [GENERAL] Null and Void() - Or, Abandon All Hope Ye Who allow

2006-07-05 Thread Greg Stark
Scott Marlowe <[EMAIL PROTECTED]> writes: > However, there are often nulls that fall in the category of "who > cares?" For those, null is a perfectly acceptable alternative, and > there's no need for all the extra work. There is often a need for special case values. Situations like "subscriptio

Re: [GENERAL] Null and Void() - Or, Abandon All Hope Ye Who allow

2006-07-05 Thread Scott Marlowe
On Mon, 2006-07-03 at 11:09, Scott Ribe wrote: > > Can't the intelligent practitioner simply proceed carefully with > > queries when nulls are involved? > > Yes. The thing is, getting rid of NULL in the real world requires > decomposing data into so many tables that it would certainly cause more >

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread Dany De Bontridder
On Wednesday 05 July 2006 16:46, Bjørn T Johansen wrote: > I need to make a funtion that take one parameter and then returns a > "record" with x number of fields, collected from x no. of tables, i.e. I > need to run several sql statemtents to collect all the needed values from x > no. of fields and

Re: [GENERAL] Database connectivity using a unix shell

2006-07-05 Thread Joshua D. Drake
On Wednesday 05 July 2006 10:29, Richard Broersma Jr wrote: > > On Wednesday 05 July 2006 09:11, Jasbinder Bali wrote: > > > Hi, > > > Before using ECPG, i had a few questions. > > > Lets say i have a C code and want to do something with my postgres > > > database. > > > What all header files do i

Re: [GENERAL] Database connectivity using a unix shell

2006-07-05 Thread Richard Broersma Jr
> On Wednesday 05 July 2006 09:11, Jasbinder Bali wrote: > > Hi, > > Before using ECPG, i had a few questions. > > Lets say i have a C code and want to do something with my postgres > > database. > > What all header files do i need for ECPG. > > Also how and where exactly am i going to write these

Re: [GENERAL] ECPG usage

2006-07-05 Thread Richard Broersma Jr
> Hi > Can anyone help me with the usage of ECPG?? > Like how to go about it, what all header files to include in my C file > and other things that i need to give due considerations before using ECPG Sorry, I don't really know. I've never used it. But I can try to take a guess from 2 minutes I s

Re: [GENERAL] Database connectivity using a unix shell

2006-07-05 Thread Joshua D. Drake
On Wednesday 05 July 2006 09:11, Jasbinder Bali wrote: > Hi, > Before using ECPG, i had a few questions. > > Lets say i have a C code and want to do something with my postgres > database. > > What all header files do i need for ECPG. > Also how and where exactly am i going to write these EXEC SQL s

[GENERAL] ECPG usage

2006-07-05 Thread Jasbinder Bali
HiCan anyone help me with the usage of ECPG??Like how to go about it, what all header files to include in my C file and other things that i need to give due considerations before using ECPG~Jas

Re: [GENERAL] Database connectivity using a unix shell

2006-07-05 Thread Jasbinder Bali
Hi,Before using ECPG, i had a few questions.Lets say i have a C code and want to do something with my postgres database. What all header files do i need for ECPG.Also how and where exactly am i going to write these EXEC SQL statements for ECPG. Can I be briefed about the steps to do this.Regards,~J

Re: [GENERAL] Inheritance and unique constraints

2006-07-05 Thread John Purser
On Wed, 05 Jul 2006 15:51:23 +0200 "Christian Rengstl" <[EMAIL PROTECTED]> wrote: > Hi everyone, > > i hope (and i'm sure) somebody can answer my question: if i have a > master table and several "child" tables, do the child tables inherit > the unique constraint(s) defined for the master table or

Re: [GENERAL] pgsql vs mysql

2006-07-05 Thread Scott Marlowe
On Sat, 2006-07-01 at 22:27, Christopher Browne wrote: > In an attempt to throw the authorities off his trail, [EMAIL PROTECTED] > ("Merlin Moncure") transmitted: > > hm. that's all very true (and important), but I try and keep focus > > on the things besides basic correctness that drive the devel

[GENERAL] Help making a plpgsql function?

2006-07-05 Thread Bjørn T Johansen
I need to make a funtion that take one parameter and then returns a "record" with x number of fields, collected from x no. of tables, i.e. I need to run several sql statemtents to collect all the needed values from x no. of fields and insert it into a "record" and return the "record" at the end.

[GENERAL] Dumping in LATIN1 and restoring in UTF-8

2006-07-05 Thread Marco Bizzarri
Hi all. Here is my use case: I've an application which uses PostgreSQL as backend. Up to now, the database was encoded in SQL_ASCII or LATIN1. Now, we need to migrate to UTF-8. What we tried, was to: 1) dump the database using pg_dump, in tar format (we had blob); 2) modifying the result, using

Re: [GENERAL] How to hide NOTICE messages in psql.exe ?

2006-07-05 Thread Michael Fuhr
On Wed, Jul 05, 2006 at 07:12:02AM -0700, Szymic1 wrote: > I use psql.exe program under windows and I would like that program will > hide all NOTICE messages. Is there any psql.exe parameter ? Because of > big number of NOTICE messages is very hard to find errors. Does "SET client_min_messages TO

[GENERAL] How to hide NOTICE messages in psql.exe ?

2006-07-05 Thread Szymic1
Hi I use psql.exe program under windows and I would like that program will hide all NOTICE messages. Is there any psql.exe parameter ? Because of big number of NOTICE messages is very hard to find errors. Michal Szymanski http://blog.szymanskich.net ---(end of broadcast)

Re: [GENERAL] OLEDB connection does not want to work. Help!!

2006-07-05 Thread tommaso . gastaldi
Hi Merlin, thanks! Yesterday I had the big honor to talk (by email) with Shachar and it seems that they (someday) will fix this fundamental issue. I tried to stress how important is to support the OleDbSchemaGuid info, as the main reason one wants to use this driver, like me, is because he is do

[GENERAL] Inheritance and unique constraints

2006-07-05 Thread Christian Rengstl
Hi everyone, i hope (and i'm sure) somebody can answer my question: if i have a master table and several "child" tables, do the child tables inherit the unique constraint(s) defined for the master table or do i have to define the same constraints for the same fields in all the child tables? Th

Re: [GENERAL] OLEDB connection does not want to work. Help!!

2006-07-05 Thread Merlin Moncure
On 4 Jul 2006 07:31:04 -0700, [EMAIL PROTECTED] sqlserver, Mysql, db2, access, Oracle [to say although I know nothing about Postgres, in general I should know how to deal with OleDb] This one is the only one DBMS is giving me headache. Could you please help me out to spot the problem? I work no

RES: [GENERAL] Phantom groups

2006-07-05 Thread Carlos H. Reimer
Sorry, I would like to say pg_dumpall and not pg_dump. --no-privileges is an option but I need to restore the privileges. There are a lot of them in the system, many many objects and privileges. > -Mensagem original- > De: Chris [mailto:[EMAIL PROTECTED] > Enviada em: quarta-feira, 5 de j

Re: [GENERAL] stored procedures

2006-07-05 Thread hubert depesz lubaczewski
On 6/30/06, Alain Roger <[EMAIL PROTECTED]> wrote: i'm migrating some SP from MySQL to PostgreSQL 8.1.xI would like to know if it is possible to return aresult of a select request and also a simple interger...that's definitelly possible (and by the way - is was possi ble years before mysql implemen