[GENERAL] naked objects from stored procedures, interface generation

2010-12-23 Thread Wim Bertels
Hallo, there exist many framework that 'backward' engineer from a programming language to database to make the data persistent. so: code db (generated) eg. hibernate, turbogears many others My question is, from db point of view, do we have such frameworks that work the other way, ie that

Re: [GENERAL] naked objects from stored procedures, interface generation

2010-12-23 Thread Pavel Stehule
Hello I know about one similar project - Garuda, but this project isn't open. What it does: * OOP - objects, properties, methods - not based on PostgreSQL OOP * support of workflow - lifecycle for objects * support of collection of objects It was designed in plpgsql with special modules to

Re: [GENERAL] naked objects from stored procedures, interface generation

2010-12-23 Thread John R Pierce
On 12/23/10 12:19 AM, Wim Bertels wrote: My question is, from db point of view, do we have such frameworks that work the other way, ie that forward engineer from a database to a user interface (web or program), maybe using the stored procedures available on the database (eg in the same naked

[GENERAL] Need Help in query

2010-12-23 Thread Satish Burnwal (sburnwal)
I need a help in writing a query. I have data as follows: mydb=# select * from usrlog ; logid | userid | loginhr | logouthr ---+--+-+-- 0 | sburnwal | 0 |1 1 | rickyrs | 1 |5 2 | satishbn | 1 |6 3 |

Re: [GENERAL] Need Help in query

2010-12-23 Thread Nicklas Avén
Hallo This I think should work. To get the usernames by hour as you describe: SELECT h.hour, usrlog.userid (select generate_series(1,24) as hour) as h inner join usrlog on h.hour = usrlog.loginhr and h.hour lt;= usrlog.logouthr order by h.hour, usrlog.userid; To get the number of users per

[GENERAL] Issue while using PostgreSql 8.4.

2010-12-23 Thread Atul Kumar
Hi, I am using PostgreSql 8.4 for my web application also am using following technology stacks: 1 Java 2 Window XP (OS). 3 JBoss Server4.2. My issue is, first time I am creating the table and inserting some rows of data. After doing some logic going to delete

Re: [GENERAL] Need Help in query

2010-12-23 Thread Satish Burnwal (sburnwal)
Thanks! I did not know such a function exists. From: Nicklas Avén [mailto:nicklas.a...@jordogskog.no] Sent: Thursday, December 23, 2010 3:31 PM To: Satish Burnwal (sburnwal) Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Need Help in query Hallo This I think should work. To get

Re: [GENERAL] copy from problem

2010-12-23 Thread Mark Watson
Le 22/12/2010 21:34, Mark Watson a écrit : Hello all, (Postgres 8.4.6 Windows) I am stumped as to why I cannot import this using copy from within pgadmin (the following table is created in an existing database with an encoding of WIN1252 and the Postgres server_encoding is UTF8) : CREATE

Re: [GENERAL] copy from problem

2010-12-23 Thread Guillaume Lelarge
Le 23/12/2010 14:36, Mark Watson a écrit : Le 22/12/2010 21:34, Mark Watson a écrit : Hello all, (Postgres 8.4.6 Windows) I am stumped as to why I cannot import this using copy from within pgadmin (the following table is created in an existing database with an encoding of WIN1252 and the

Re: [GENERAL] copy from problem

2010-12-23 Thread Mark Watson
Le 23/12/2010 14:36, Mark Watson a écrit : Le 22/12/2010 21:34, Mark Watson a écrit : Hello all, (Postgres 8.4.6 Windows) I am stumped as to why I cannot import this using copy from within pgadmin (the following table is created in an existing database with an encoding of WIN1252 and the

Re: [GENERAL] [BUGS] Issue while using PostgreSql 8.4.

2010-12-23 Thread Kevin Grittner
Atul Kumar atul_ku...@persistent.co.in wrote: My issue is, first time I am creating the table and inserting some rows of data. After doing some logic going to delete that table . I am observing application is getting hang while executing statement.execute(). It's taking a long time to run

Re: [GENERAL] Issue while using PostgreSql 8.4.

2010-12-23 Thread Harald Armin Massa
Atul, My issue is, first time I am creating the table and inserting some rows of data. After doing some logic going to delete that table . I am observing application is getting hang while executing statement.execute(). Please suggest me how to fix this issue. I am assuming your

[GENERAL] FW: Issue while using PostgreSql 8.4.

2010-12-23 Thread Atul Kumar
Hi, I am using PostgreSql 8.4 for my web application also am using following technology stacks: 1 Java 2 Window XP (OS). 3 JBoss Server4.2. My issue is, first time I am creating the table and inserting some rows of data. After doing some logic going to delete

[GENERAL] Issue while using PostgreSql 8.4.

2010-12-23 Thread Atul Kumar
Hi, I am using PostgreSql 8.4 for my web application also am using following technology stacks: 1 Java 2 Window XP (OS). 3 JBoss Server4.2. My issue is, first time I am creating the table and inserting some rows of data. After doing some logic going to delete

[GENERAL] Data backup to local duplicate without resetting permissions

2010-12-23 Thread gvim
What's the easiest way, in PostgreSQL 9.0, to keep a duplicate database on my local machine updated at intervals from another on a remote machine without having to reset permissions after a backup/restore. Also which type of backup? Plain text or compressed? Data-only or complete shema? Setup

Re: [GENERAL] could not accept SSPI security context

2010-12-23 Thread Reto Schöning
thanks a lot for the hints. All connections I tried used the IP address of the pg server. Also the service name should be the default one. I tried setting the sspitarget in SSPIHandler.cs to all sorts of variations, including fully qualified names. The error remains exactly the same, even when I

[GENERAL] How to calculate length of path data without diagonals?

2010-12-23 Thread Romain Billoir
Hi, i need to calculate some length of path without diagonal. Some examples: length((5,5),(6,6))) returns 1.41. I need 2: 5,5 to 5,6 + 5,6 to 6,6. Is that possible?

Re: [GENERAL] How to calculate length of path data without diagonals?

2010-12-23 Thread John R Pierce
On 12/23/10 10:25 AM, Romain Billoir wrote: Hi, i need to calculate some length of path without diagonal. Some examples: length((5,5),(6,6))) returns 1.41. I need 2: 5,5 to 5,6 + 5,6 to 6,6. Is that possible? a path of just two points? something like abs(x1-x2) + abs(y1-y2). -- Sent via

Re: [GENERAL] Data backup to local duplicate without resetting permissions

2010-12-23 Thread Adrian Klaver
On 12/23/2010 08:55 AM, gvim wrote: What's the easiest way, in PostgreSQL 9.0, to keep a duplicate database on my local machine updated at intervals from another on a remote machine without having to reset permissions after a backup/restore. Also which type of backup? Plain text or compressed?

Re: [GENERAL] How to calculate length of path data without diagonals?

2010-12-23 Thread Stephen Cook
On 12/23/2010 1:25 PM, Romain Billoir wrote: Hi, i need to calculate some length of path without diagonal. Some examples: length((5,5),(6,6))) returns 1.41. I need 2: 5,5 to 5,6 + 5,6 to 6,6. Is that possible? You could write a function to get the Manhattan distance between two points,

Re: [GENERAL] Understanding Schema's

2010-12-23 Thread Jasen Betts
On 2010-12-15, Carlos Mennens carlos.menn...@gmail.com wrote: On Tue, Dec 14, 2010 at 7:17 PM, Joshua D. Drake j...@commandprompt.com wrote: You can cross query a schema but not a database. So you can create: create table fire.foo() create table ice.foo() And they are isolated from each

Re: [GENERAL] Understanding Schema's

2010-12-23 Thread Jasen Betts
On 2010-12-15, Craig Ringer cr...@postnewspapers.com.au wrote: On 12/15/2010 08:08 AM, Carlos Mennens wrote: I've recently switched from MySQL have read the documentation for 'schema's' however I guess I'm just not at that level or really daft when it comes to database design. In terms of

[GENERAL] Stitch Large Panorama

2010-12-23 Thread Alfred
Hi, there, First of all, happy holidays to every one! I wish all of you the best in the coming 2011. I recently released a large panorama on Gigapan at http://www.gigapan.org/gigapans/66626/ . This panorama received many serious debate about the true pixel count. Since I used Autopano, my

Re: [GENERAL] When the trigger is called my application is awaiting the finish

2010-12-23 Thread Jasen Betts
On 2010-12-16, fel...@informidia.com.br fel...@informidia.com.br wrote: This is a multi-part message in MIME format. --080402070005010104020405 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hello, I'm having a problem

Re: [GENERAL] Data backup to local duplicate without resetting permissions

2010-12-23 Thread Jasen Betts
On 2010-12-23, gvim gvi...@gmail.com wrote: What's the easiest way, in PostgreSQL 9.0, to keep a duplicate database on my local machine updated at intervals from another on a remote machine without having to reset permissions after a backup/restore. create roles matching the names of the

Re: [GENERAL] How to calculate length of path data without diagonals?

2010-12-23 Thread Jasen Betts
On 2010-12-23, Romain Billoir billo...@gmail.com wrote: --0015175ccf48e6186a049817fc59 Content-Type: text/plain; charset=ISO-8859-1 Hi, i need to calculate some length of path without diagonal. Some examples: length((5,5),(6,6))) returns 1.41. I need 2: 5,5 to 5,6 + 5,6 to 6,6. Is that