Re: [GENERAL] [pgadmin-support] Separate Sessions?? (View data - Query tool)

2008-11-28 Thread Willy-Bas Loos
how about this: create role firm1 nologin; create role john password 'secret' login; grant firm1 to john; create role firm2 nologin; create role amy password 'secret' login; grant firm2 to amy; create table table1 (id serial primary key,firm integer, val integer); insert into table1 (firm, val)

[GENERAL] [NOOB] try tu put a number with pqexecprepare

2008-11-28 Thread elekis
hi, I try to use postgresql with a simple example using parameter, (so with pqprepare and pqexecprepare). I have trouble to put number. I put the code here http://pastebin.com/m1860cc27 I symply try to put the number 5 for the second column, and after that read the line. but the database, I

Re: [GENERAL] [NOOB] try tu put a number with pqexecprepare

2008-11-28 Thread elekis
hi, and thanks something, I don't underdstand, a little research on google say to me that htonl and...is in #include arpa/inet.h a network stuff is that normal that I have to use that??? I just wanna put number in the db.(sniff) thanks a++ On Fri, Nov 28, 2008 at 11:23 AM, Daniel

Re: [GENERAL] [NOOB] try tu put a number with pqexecprepare

2008-11-28 Thread Raymond O'Donnell
On 28/11/2008 10:40, elekis wrote: I just wanna put number in the db.(sniff) ROFOL! I can't help you with your problem, but you've made my morning! :-) Ray. -- Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland

Re: [GENERAL] [NOOB] try tu put a number with pqexecprepare

2008-11-28 Thread Serge Fonville
I symply try to put the number 5 for the second column, and after that read the line. I just wanna put number in the db.(sniff) To put 5 in your database use either a text of numeric datatype for your column. I use cl.exe (windows) and he say Cannot open include file: 'netinet/in.h': No

[GENERAL] psql verbose mode

2008-11-28 Thread Grzegorz Jaśkiewicz
hey folks, browsing psql source,I came across one of the variations of \list / -l option, that could also print database size, which would be quite nice. But that only seem to work in 'verbose' mode. Now, how can I turn that mode on on command line, psql -lv doesn't do ; -- GJ

Re: [GENERAL] [NOOB] try tu put a number with pqexecprepare

2008-11-28 Thread Daniel Verite
elekis wrote: by the way, I use cl.exe (windows) and he say Cannot open include file: 'netinet/in.h': No such file or directory is there any options compiles?? or other include ?? For windows, I'm using this: #include winsock2.h and it appears to be good enough. You may have to

Re: [GENERAL] [pgadmin-support] Separate Sessions?? (View data - Query tool)

2008-11-28 Thread Willy-Bas Loos
oh, and : revoke all on table1 from public; revoke all on view_firm1 from public; revoke all on view_firm2 from public; duh -- Patriotism is the conviction that your country is superior to all others because you were born in it. -- George Bernard Shaw

[GENERAL] How to design for cheap reliability with PostgreSQL?

2008-11-28 Thread Michael Meier
Hi, I am in the process of designing a distributed application (Java EE 5) which has demand for database functionality at several points. Some of these databases need to provide really mission critical reliability, i.e. it would be the end of our world, if we would suffer from data loss or silent

Fwd: [GENERAL] [NOOB] try tu put a number with pqexecprepare

2008-11-28 Thread elekis
-- Forwarded message -- From: elekis [EMAIL PROTECTED] Date: Fri, Nov 28, 2008 at 12:53 PM Subject: Re: [GENERAL] [NOOB] try tu put a number with pqexecprepare To: Daniel Verite [EMAIL PROTECTED] thanks for everything (and sorry for my english :D) a++ On Fri, Nov 28, 2008 at

Re: [GENERAL] pglib.dll for windows ce

2008-11-28 Thread Julius Tuskenis
Sorry - its libpq.dll Julius Tuskenis Julius Tuskenis rašė: Hello List, I'm writing a program to be run on WinCE. Are there dll's for wince client (pglib.dll and others)? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] [NOOB] try tu put a number with pqexecprepare

2008-11-28 Thread Serge Fonville
I simply try to put the number 5 for the second column, and after that read the line. I just wanna put number in the db.(sniff) To put 5 in your database use either a text of numeric datatype for your column. I use cl.exe (windows) and he say Cannot open include file: 'netinet/in.h': No

Re: [GENERAL] [NOOB] try tu put a number with pqexecprepare

2008-11-28 Thread Daniel Verite
elekis wrote: I put the code here http://pastebin.com/m1860cc27 I symply try to put the number 5 for the second column, and after that read the line. but the database, I have taht 83886080 in place of 5. 83886080 happens to be ntohl(5), it's probably not a coincidence :)

Re: [GENERAL] [ADMIN] PgAgent Job Scehduler is NOT running

2008-11-28 Thread Abdul Rahman
That's it! Arora your document (http://wiki.postgresql.org/wiki/Image:PgAgent_for_windows.doc) is better than the best. The error was of postgress user rights and nothing else. After granting rights to postgres Its really running well. Thanks. From: Vishal

Re: [GENERAL] [pgadmin-support] Separate Sessions?? (View data - Query tool)

2008-11-28 Thread Willy-Bas Loos
Only, it's too bad that you can't update the records from the view data dialog. It works in access2000, it doesn't know the difference between views and tables (the difference is actually very small). You probably get some annoying error when you try to edit a normal select view from access,

[GENERAL] Trigger before delete does fire before, but delete doesn't not happen

2008-11-28 Thread Stéphane A. Schildknecht
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm faced with something like a comprehension problem. The exemple may be oversimplified, but, it seems same problem happens with updates. To simplify, I have triggers on 2 tables (commande and commandeligne). When deleting from table

Re: [GENERAL] [NOOB] try tu put a number with pqexecprepare

2008-11-28 Thread elekis
On Fri, Nov 28, 2008 at 11:48 AM, Raymond O'Donnell [EMAIL PROTECTED] wrote: On 28/11/2008 10:40, elekis wrote: I just wanna put number in the db.(sniff) ROFOL! be my guess :D by the way, I use cl.exe (windows) and he say Cannot open include file: 'netinet/in.h': No such file or

Re: [GENERAL] [pgadmin-support] Separate Sessions?? (View data - Query tool)

2008-11-28 Thread Dave Page
On Fri, Nov 28, 2008 at 11:04 AM, Willy-Bas Loos [EMAIL PROTECTED] wrote: Only, it's too bad that you can't update the records from the view data dialog. It works in access2000, it doesn't know the difference between views and tables (the difference is actually very small). You probably get

Re: [GENERAL] pglib.dll for windows ce

2008-11-28 Thread Hiroshi Saito
Hi Julius-san. Is this helpful? http://libpqwce.projects.postgresql.org/ However, I'm busy and work has stagnated. Regards, Hiroshi Saito - Original Message - From: Julius Tuskenis [EMAIL PROTECTED] To: pgsql-general@postgresql.org Sent: Friday, November 28, 2008 10:07 PM

[GENERAL] [TextSearch] syntax error while parsing affix file

2008-11-28 Thread Daniel Chiaramello
Hello everybody. I am using Postrges 8.3.5, and I am trying to install a bulgarian ISpell dictionary (the OpenOffice one) for Textsearch features. I converted the dictionary encoding to UTF-8, and I installed it in the tsearch_data folder. But when I try to create the dictionary, I have a

Re: [GENERAL] Problem with langage encoding

2008-11-28 Thread Stephane Bortzmeyer
On Thu, Nov 27, 2008 at 02:34:17AM +0900, Craig Ringer [EMAIL PROTECTED] wrote a message of 188 lines which said: ERROR: character 0xc3bd of encoding UTF8 has no equivalent in WIN1251 Which it does not; that character is ??? (HANGUL SYLLABLE SSYEG) No, I don't think so. I think that

[GENERAL] Very large tables

2008-11-28 Thread William Temperley
Hi all Has anyone any experience with very large tables? I've been asked to store a grid of 1.5 million geographical locations, fine. However, associated with each point are 288 months, and associated with each month are 500 float values (a distribution curve), i.e. 1,500,000 * 288 * 500 = 216

Re: [GENERAL] Getting back the autocast on non-character via CREATE CAST

2008-11-28 Thread Adrian Klaver
On Thursday 27 November 2008 8:17:10 pm Александър Шопов wrote: Hi everyone, In pg 8.2 to 8.3 transition there is a new behavior: Non-character data types are no longer automatically cast to TEXT I understand the reasons, however while we manage to migrate the our system, is there a way to

Re: [GENERAL] Very large tables

2008-11-28 Thread Alvaro Herrera
William Temperley escribió: I've been asked to store a grid of 1.5 million geographical locations, fine. However, associated with each point are 288 months, and associated with each month are 500 float values (a distribution curve), i.e. 1,500,000 * 288 * 500 = 216 billion values :). So a

Re: [GENERAL] Trigger before delete does fire before, but delete doesn't not happen

2008-11-28 Thread Adrian Klaver
On Friday 28 November 2008 3:47:10 am Stéphane A. Schildknecht wrote: drop table commande cascade; drop table commandeligne; CREATE TABLE commande (   id integer NOT NULL,   montant real,   CONSTRAINT id PRIMARY KEY (id) )with oids; CREATE TABLE commandeligne (   id_commande integer

Re: [GENERAL] Very large tables

2008-11-28 Thread Grzegorz Jaśkiewicz
On Fri, Nov 28, 2008 at 3:48 PM, Alvaro Herrera [EMAIL PROTECTED]wrote: William Temperley escribió: I've been asked to store a grid of 1.5 million geographical locations, fine. However, associated with each point are 288 months, and associated with each month are 500 float values (a

Re: [GENERAL] Using postgres.log file for replication

2008-11-28 Thread Ioana Danes
Hi Scott, Thanks for the replay, It is almost impossible to use any of the replication tools mostly because the 2 dbs are not on the same network (live and testing environments)... I don't intend to use this for high availability. I am using Sequoia and PITR for that... I only intend to use

Re: [GENERAL] Very large tables

2008-11-28 Thread William Temperley
On Fri, Nov 28, 2008 at 3:48 PM, Alvaro Herrera [EMAIL PROTECTED] wrote: William Temperley escribió: So a 216 billion row table is probably out of the question. I was considering storing the 500 floats as bytea. What about a float array, float[]? I guess that would be the obvious choice...

Re: [GENERAL] Using postgres.log file for replication

2008-11-28 Thread Ioana Danes
Thanks for the reply Chris, None of these are a problem for me because we are not using them at all... Thanks again, Ioana --- On Thu, 11/27/08, Chris Browne [EMAIL PROTECTED] wrote: From: Chris Browne [EMAIL PROTECTED] Subject: Re: [GENERAL] Using postgres.log file for replication To:

Re: [GENERAL] PostgreSQL 8.3.5 client_encoding WIN1251 trouble

2008-11-28 Thread Stephane Bortzmeyer
On Tue, Nov 25, 2008 at 04:19:27PM +0300, Dr.ONE [EMAIL PROTECTED] wrote a message of 22 lines which said: I have database in KOI8-R encoding. ... ERROR: character 0x8b9a of encoding MULE_INTERNAL has no equivalent in WIN1251 Are you sure it is KOI8? The KOI8 encoding is monobyte and you

Re: [GENERAL] [TextSearch] syntax error while parsing affix file

2008-11-28 Thread Tom Lane
Daniel Chiaramello [EMAIL PROTECTED] writes: I am using Postrges 8.3.5, and I am trying to install a bulgarian ISpell dictionary (the OpenOffice one) for Textsearch features. I'm not an expert, but I think our ispell code supports only a subset of the features that some other implementations

Re: [GENERAL] [ADMIN] PgAgent Job Scehduler is NOT running

2008-11-28 Thread Vishal Arora
Its located in Application Data folder. Date: Thu, 27 Nov 2008 21:12:23 -0800From: [EMAIL PROTECTED]: Re: [ADMIN] PgAgent Job Scehduler is NOT runningTo: [EMAIL PROTECTED]; [EMAIL PROTECTED]: pgsql-general@postgresql.org I searched but didn't find any pgpass.conf file. From: Vishal

Re: [GENERAL] Very large tables

2008-11-28 Thread Scara Maccai
Really I'm worried about reducing storage space and network overhead - therefore a nicely compressed chunk of binary would be perfect for the 500 values - wouldn't it? For storage space you might want to look at ZFS with compression on in case you are using FreeBSD or Solaris. That would

Re: [GENERAL] Very large tables

2008-11-28 Thread Alvaro Herrera
William Temperley escribió: Really I'm worried about reducing storage space and network overhead - therefore a nicely compressed chunk of binary would be perfect for the 500 values - wouldn't it? An array that large would likely be compressed by Postgres internally for storage; see

Re: [GENERAL] Very large tables

2008-11-28 Thread Grzegorz Jaśkiewicz
2008/11/28 William Temperley [EMAIL PROTECTED] Any more normalized and I'd have 216 billion rows! Add an index and I'd have - well, a far bigger table than 432 million rows each containing a float array - I think? Really I'm worried about reducing storage space and network overhead -

Re: [GENERAL] Very large tables

2008-11-28 Thread Simon Riggs
On Fri, 2008-11-28 at 15:40 +, William Temperley wrote: Hi all Has anyone any experience with very large tables? I've been asked to store a grid of 1.5 million geographical locations, fine. However, associated with each point are 288 months, and associated with each month are 500

Re: [GENERAL] Very large tables

2008-11-28 Thread William Temperley
On Fri, Nov 28, 2008 at 5:46 PM, Simon Riggs [EMAIL PROTECTED] wrote: I would look carefully at the number of bits required for each float value. 4 bytes is the default, but you may be able to use less bits than that rather than rely upon the default compression scheme working in your favour.

Re: [GENERAL] Very large tables

2008-11-28 Thread Ron Mayer
Grzegorz Jaśkiewicz wrote: true, if you don't want to search on values too much ,or at all - use float[]. But otherwise, keep stuff in a tables as such. It might be humongous in size, but at the end of the day - prime thing when designing a db is speed of queries. If he's worried about

[GENERAL] why hash on the primary key?

2008-11-28 Thread Robert Haas
I'm seeing a lot of plans in my database that look like this: portal=# explain select * from foo i, foo j where i.id = j.id; QUERY PLAN - Hash Join (cost=769.87..2159.36 rows=13283 width=264)

Re: [GENERAL] why hash on the primary key?

2008-11-28 Thread Adam Rich
I'm seeing a lot of plans in my database that look like this: It seems very strange for the planner to decide to build an in-memory hash table on a column that is already indexed (the primary key, no less!). But this is happening A LOT - I often see plans where a majority of the joins are

Re: [GENERAL] why hash on the primary key?

2008-11-28 Thread Tom Lane
Robert Haas [EMAIL PROTECTED] writes: It seems very strange for the planner to decide to build an in-memory hash table on a column that is already indexed (the primary key, no less!). What's strange about it? A probe into an in-memory hashtable is a lot cheaper than a probe into an index, so

Re: [GENERAL] [pgadmin-support] Separate Sessions?? (View data - Query tool)

2008-11-28 Thread Willy-Bas Loos
If I understand well you say that I could isolate data by using separate group roles for each firms and defining updatable views to work on. yes. it's one way to do it. As simple as this example is, you might as well make a seperate table for each firm. Then you wouldn't need to bother with views

[GENERAL] configure options

2008-11-28 Thread Siddharth Shah
Hi, I am compiling postgres, I have some doubts on ./configure options --enable-nls[=LANGUAGES] enable Native Language Support Do I need to supply each language name which i am going to store in my database or just have to take support UTF-8 ? and --disable-largefile Does

Re: [GENERAL] configure options

2008-11-28 Thread Scott Marlowe
On Fri, Nov 28, 2008 at 11:20 PM, Siddharth Shah [EMAIL PROTECTED] wrote: Hi, I am compiling postgres, I have some doubts on ./configure options --enable-nls[=LANGUAGES] enable Native Language Support Do I need to supply each language name which i am going to store in my database