Re: [INTERFACES] PGSQL and Javascript

Lists: pgsql-generalpgsql-interfaces
From: Reg Me Please <regmeplease(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: PGSQL and Javascript
Date: 2009-01-30 11:40:36
Message-ID: 200901301240.37112.regmeplease@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

Hello all.

Is there a way to directly access PGSQL from a Javascript application?
With no application server intervention, I mean.
Just like libq allows access from C/C++.

--
Fahrbahn ist ein graues Band
weisse Streifen, grüner Rand


From: Allan Kamau <kamauallan(at)gmail(dot)com>
To: Reg Me Please <regmeplease(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: PGSQL and Javascript
Date: 2009-01-30 11:53:05
Message-ID: ab1ea6540901300353w71bb5991j392795006ffb3ad3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

May be Javascript + JDBC not sure.

But the question is why would you want to do so?
Javascript can be read easily by the user having the javascript
running on their browser. JDBC or any other database connecting client
will want to some how authenticate the user in most cases the
username, password and maybe remote IP is used. This mean that your
javascript will probably contain username and password in order to use
JDBC to connect to the DB, is this favourable?

Allan.

On Fri, Jan 30, 2009 at 1:40 PM, Reg Me Please <regmeplease(at)gmail(dot)com> wrote:
> Hello all.
>
> Is there a way to directly access PGSQL from a Javascript application?
> With no application server intervention, I mean.
> Just like libq allows access from C/C++.
>
> --
> Fahrbahn ist ein graues Band
> weisse Streifen, grüner Rand
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>


From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Reg Me Please <regmeplease(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] PGSQL and Javascript
Date: 2009-01-30 11:56:42
Message-ID: 264855a00901300356t56bd2c46m1f72f68b74d8df71@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

No. I'm not sure how that could be done given the security concerns.
Sean

On Fri, Jan 30, 2009 at 6:40 AM, Reg Me Please <regmeplease(at)gmail(dot)com>wrote:

> Hello all.
>
> Is there a way to directly access PGSQL from a Javascript application?
> With no application server intervention, I mean.
> Just like libq allows access from C/C++.
>
> --
> Fahrbahn ist ein graues Band
> weisse Streifen, grüner Rand
>
> --
> Sent via pgsql-interfaces mailing list (pgsql-interfaces(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-interfaces
>


From: Reg Me Please <regmeplease(at)gmail(dot)com>
To: Allan Kamau <kamauallan(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: PGSQL and Javascript
Date: 2009-01-30 12:09:46
Message-ID: 200901301309.47273.regmeplease@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

I'd like to write part of the application in Javascript, server side, not in
the web page.

On Friday 30 January 2009 12:53:05 Allan Kamau wrote:
> May be Javascript + JDBC not sure.
>
> But the question is why would you want to do so?
> Javascript can be read easily by the user having the javascript
> running on their browser. JDBC or any other database connecting client
> will want to some how authenticate the user in most cases the
> username, password and maybe remote IP is used. This mean that your
> javascript will probably contain username and password in order to use
> JDBC to connect to the DB, is this favourable?
>
> Allan.
>
> On Fri, Jan 30, 2009 at 1:40 PM, Reg Me Please <regmeplease(at)gmail(dot)com>
wrote:
> > Hello all.
> >
> > Is there a way to directly access PGSQL from a Javascript application?
> > With no application server intervention, I mean.
> > Just like libq allows access from C/C++.
> >
> > --
> > Fahrbahn ist ein graues Band
> > weisse Streifen, grüner Rand
> >
> > --
> > Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-general

--
Fahrbahn ist ein graues Band
weisse Streifen, grüner Rand


From: "Leif B(dot) Kristensen" <leif(at)solumslekt(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PGSQL and Javascript
Date: 2009-01-30 12:17:16
Message-ID: 200901301317.16435.leif@solumslekt.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

On Friday 30. January 2009, Reg Me Please wrote:
>Hello all.
>
>Is there a way to directly access PGSQL from a Javascript application?
>With no application server intervention, I mean.
>Just like libq allows access from C/C++.

The usual way to handle it is to let the JavaScript code call a
server-side script through an XMLHttpRequest() object.

>Fahrbahn ist ein graues Band
>weisse Streifen, grüner Rand

I like your sig.
--
Leif Biberg Kristensen | Registered Linux User #338009
Me And My Database: http://solumslekt.org/blog/


From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Reg Me Please <regmeplease(at)gmail(dot)com>
Cc: Allan Kamau <kamauallan(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] PGSQL and Javascript
Date: 2009-01-30 12:24:59
Message-ID: 264855a00901300424v789e00a6gc59ba5dd90c33c24@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

On Fri, Jan 30, 2009 at 7:09 AM, Reg Me Please <regmeplease(at)gmail(dot)com>wrote:

> I'd like to write part of the application in Javascript, server side, not
> in
> the web page.
>

I missed your point. Do a google search for javascript interpreters in the
language of your choice. For example, there is Rhino for java.

Sean

>
> On Friday 30 January 2009 12:53:05 Allan Kamau wrote:
> > May be Javascript + JDBC not sure.
> >
> > But the question is why would you want to do so?
> > Javascript can be read easily by the user having the javascript
> > running on their browser. JDBC or any other database connecting client
> > will want to some how authenticate the user in most cases the
> > username, password and maybe remote IP is used. This mean that your
> > javascript will probably contain username and password in order to use
> > JDBC to connect to the DB, is this favourable?
> >
> > Allan.
> >
> > On Fri, Jan 30, 2009 at 1:40 PM, Reg Me Please <regmeplease(at)gmail(dot)com>
> wrote:
> > > Hello all.
> > >
> > > Is there a way to directly access PGSQL from a Javascript application?
> > > With no application server intervention, I mean.
> > > Just like libq allows access from C/C++.
> > >
> > > --
> > > Fahrbahn ist ein graues Band
> > > weisse Streifen, grüner Rand
> > >
> > > --
> > > Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> > > To make changes to your subscription:
> > > http://www.postgresql.org/mailpref/pgsql-general
>
> --
> Fahrbahn ist ein graues Band
> weisse Streifen, grüner Rand
>
> --
> Sent via pgsql-interfaces mailing list (pgsql-interfaces(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-interfaces
>


From: Reg Me Please <regmeplease(at)gmail(dot)com>
To: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
Cc: Allan Kamau <kamauallan(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] PGSQL and Javascript
Date: 2009-01-30 12:43:39
Message-ID: 200901301343.39689.regmeplease@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

I already have a JS interpreter (spidermonkey) but there is no PGSQL
interfacing API!
This'd be why I'm asking.

On Friday 30 January 2009 13:24:59 Sean Davis wrote:
> On Fri, Jan 30, 2009 at 7:09 AM, Reg Me Please <regmeplease(at)gmail(dot)com>wrote:
> > I'd like to write part of the application in Javascript, server side, not
> > in
> > the web page.
>
> I missed your point. Do a google search for javascript interpreters in the
> language of your choice. For example, there is Rhino for java.
>
> Sean
>
> > On Friday 30 January 2009 12:53:05 Allan Kamau wrote:
> > > May be Javascript + JDBC not sure.
> > >
> > > But the question is why would you want to do so?
> > > Javascript can be read easily by the user having the javascript
> > > running on their browser. JDBC or any other database connecting client
> > > will want to some how authenticate the user in most cases the
> > > username, password and maybe remote IP is used. This mean that your
> > > javascript will probably contain username and password in order to use
> > > JDBC to connect to the DB, is this favourable?
> > >
> > > Allan.
> > >
> > > On Fri, Jan 30, 2009 at 1:40 PM, Reg Me Please <regmeplease(at)gmail(dot)com>
> >
> > wrote:
> > > > Hello all.
> > > >
> > > > Is there a way to directly access PGSQL from a Javascript
> > > > application? With no application server intervention, I mean.
> > > > Just like libq allows access from C/C++.
> > > >
> > > > --
> > > > Fahrbahn ist ein graues Band
> > > > weisse Streifen, grüner Rand
> > > >
> > > > --
> > > > Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> > > > To make changes to your subscription:
> > > > http://www.postgresql.org/mailpref/pgsql-general
> >
> > --
> > Fahrbahn ist ein graues Band
> > weisse Streifen, grüner Rand
> >
> > --
> > Sent via pgsql-interfaces mailing list (pgsql-interfaces(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-interfaces

--
Fahrbahn ist ein graues Band
weisse Streifen, grüner Rand


From: "Miha D(dot) Puc" <miha(dot)puc(at)eba(dot)si>
To: Reg Me Please <regmeplease(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] PGSQL and Javascript
Date: 2009-01-30 12:52:11
Message-ID: 4982F7FB.5020202@eba.si
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

Well you can add you own objects to Spidermonkey via its c api. So you
can implement something like Database object in c using libq and access
it from your script.
Regards,
Miha

Reg Me Please pravi:
> I already have a JS interpreter (spidermonkey) but there is no PGSQL
> interfacing API!
> This'd be why I'm asking.
>
> On Friday 30 January 2009 13:24:59 Sean Davis wrote:
>
>> On Fri, Jan 30, 2009 at 7:09 AM, Reg Me Please <regmeplease(at)gmail(dot)com>wrote:
>>
>>> I'd like to write part of the application in Javascript, server side, not
>>> in
>>> the web page.
>>>
>> I missed your point. Do a google search for javascript interpreters in the
>> language of your choice. For example, there is Rhino for java.
>>
>> Sean
>>
>>
>>> On Friday 30 January 2009 12:53:05 Allan Kamau wrote:
>>>
>>>> May be Javascript + JDBC not sure.
>>>>
>>>> But the question is why would you want to do so?
>>>> Javascript can be read easily by the user having the javascript
>>>> running on their browser. JDBC or any other database connecting client
>>>> will want to some how authenticate the user in most cases the
>>>> username, password and maybe remote IP is used. This mean that your
>>>> javascript will probably contain username and password in order to use
>>>> JDBC to connect to the DB, is this favourable?
>>>>
>>>> Allan.
>>>>
>>>> On Fri, Jan 30, 2009 at 1:40 PM, Reg Me Please <regmeplease(at)gmail(dot)com>
>>>>
>>> wrote:
>>>
>>>>> Hello all.
>>>>>
>>>>> Is there a way to directly access PGSQL from a Javascript
>>>>> application? With no application server intervention, I mean.
>>>>> Just like libq allows access from C/C++.
>>>>>
>>>>> --
>>>>> Fahrbahn ist ein graues Band
>>>>> weisse Streifen, grüner Rand
>>>>>
>>>>> --
>>>>> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
>>>>> To make changes to your subscription:
>>>>> http://www.postgresql.org/mailpref/pgsql-general
>>>>>
>>> --
>>> Fahrbahn ist ein graues Band
>>> weisse Streifen, grüner Rand
>>>
>>> --
>>> Sent via pgsql-interfaces mailing list (pgsql-interfaces(at)postgresql(dot)org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-interfaces
>>>
>
>
>
>

--
__________________________________________________________
Miha D. Puc
EBA, agencija za elektronsko poslovanje, d.o.o., Ljubljana
Teslova ulica 30
SI-1000 Ljubljana
e-mail: miha(dot)puc(at)eba(dot)si
internet: www.eba.si
GSM: +386 (0)40 620 408
TEL: +386 (0)1 477 66 60
__________________________________________________________


From: Thomas Markus <t(dot)markus(at)proventis(dot)net>
To: Reg Me Please <regmeplease(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: PGSQL and Javascript
Date: 2009-01-30 13:01:01
Message-ID: 4982FA0D.2090909@proventis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

look at apache cocoon for serverside javascript (rhino engine)
you can direct access java classes. write all db stuff in java and
access it from js

var dao = Packages.my.own.package.DAOController.findAll();
Packages.java.lang.System.out.println(dao.myproperty);

regards
thomas

Reg Me Please schrieb:
> Hello all.
>
> Is there a way to directly access PGSQL from a Javascript application?
> With no application server intervention, I mean.
> Just like libq allows access from C/C++.
>
>

Attachment Content-Type Size
t_markus.vcf text/x-vcard 266 bytes

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Reg Me Please <regmeplease(at)gmail(dot)com>
Cc: Allan Kamau <kamauallan(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] PGSQL and Javascript
Date: 2009-01-30 13:02:20
Message-ID: 264855a00901300502j3f04174cm5142d9d2a4d310b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

On Fri, Jan 30, 2009 at 7:43 AM, Reg Me Please <regmeplease(at)gmail(dot)com>wrote:

> I already have a JS interpreter (spidermonkey) but there is no PGSQL
> interfacing API!
> This'd be why I'm asking.
>

Ah. Sorry again. No idea if this will be useful, but you might take a look
at:

http://www.whitebeam.org/

Sean

>
> On Friday 30 January 2009 13:24:59 Sean Davis wrote:
> > On Fri, Jan 30, 2009 at 7:09 AM, Reg Me Please <regmeplease(at)gmail(dot)com
> >wrote:
> > > I'd like to write part of the application in Javascript, server side,
> not
> > > in
> > > the web page.
> >
> > I missed your point. Do a google search for javascript interpreters in
> the
> > language of your choice. For example, there is Rhino for java.
> >
> > Sean
> >
> > > On Friday 30 January 2009 12:53:05 Allan Kamau wrote:
> > > > May be Javascript + JDBC not sure.
> > > >
> > > > But the question is why would you want to do so?
> > > > Javascript can be read easily by the user having the javascript
> > > > running on their browser. JDBC or any other database connecting
> client
> > > > will want to some how authenticate the user in most cases the
> > > > username, password and maybe remote IP is used. This mean that your
> > > > javascript will probably contain username and password in order to
> use
> > > > JDBC to connect to the DB, is this favourable?
> > > >
> > > > Allan.
> > > >
> > > > On Fri, Jan 30, 2009 at 1:40 PM, Reg Me Please <
> regmeplease(at)gmail(dot)com>
> > >
> > > wrote:
> > > > > Hello all.
> > > > >
> > > > > Is there a way to directly access PGSQL from a Javascript
> > > > > application? With no application server intervention, I mean.
> > > > > Just like libq allows access from C/C++.
> > > > >
> > > > > --
> > > > > Fahrbahn ist ein graues Band
> > > > > weisse Streifen, grüner Rand
> > > > >
> > > > > --
> > > > > Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> > > > > To make changes to your subscription:
> > > > > http://www.postgresql.org/mailpref/pgsql-general
> > >
> > > --
> > > Fahrbahn ist ein graues Band
> > > weisse Streifen, grüner Rand
> > >
> > > --
> > > Sent via pgsql-interfaces mailing list (
> pgsql-interfaces(at)postgresql(dot)org)
> > > To make changes to your subscription:
> > > http://www.postgresql.org/mailpref/pgsql-interfaces
>
>
>
> --
> Fahrbahn ist ein graues Band
> weisse Streifen, grüner Rand
>


From: "Oliveiros Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: How to pass NULL on a NpgsqlParameter
Date: 2009-02-02 18:56:19
Message-ID: 006c01c98567$ef4238b0$ec5a3d0a@marktestcr.marktest.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

Hello, all,

If I wanna set a table's column in a certain record to NULL, with an INSERT command, what value should I set the NpgsqlParameter.Value property?

Best,
Oliveiros