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
> 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
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
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
> What if I don't have a shell script and instead of that I have a C code and
> need to connect to the postgres database.
> How do i accomplish this? do i still need to call this psql clinet interface
> or there is some other way to do it..
In this case you could use ecpg:
http://www.postgresql.or
Are you just asking random questions? What do you actually want to do? You've
asked how to access Postres from a shell - now you're using 'C'. Are you going
to work your way through Java, Perl and a host of others.
All of this information is *very* clearly available in the manual at:
http://www.
What if I don't have a shell script and instead of that I have a C code and need to connect to the postgres database. How do i accomplish this? do i still need to call this psql clinet interface or there is some other way to do it..
~JasOn 6/29/06, Scott Marlowe <[EMAIL PROTECTED]> wrote:
On Thu, 2
[EMAIL PROTECTED] ("Jasbinder Bali") writes:
> in my bash script where and how do i specify the database connection
> parameters
There are three ways:
1. You can store them in environment variables:
PGDATABASE=my_database
PGPORT=8901
PGUSER=superman
PGHOST=some.host.somewhere
export PGDATABASE
This is a variation of the same:
a=`psql -U postgres -h my.host.dom -Atc "select col1 from sometable where
col2=6" dbname`
echo $a
Note that the -U and -h can specify the user name and hostname if necessary.
-A gets the data unaligned
-t gets the data without the decorations
-c "query" specifie
> isn't my normal bash script different from psql.
> In a bash script how wud u specify the db parameters
This link might have something that you would like?
http://www.psn.co.jp/PostgreSQL/pgbash/index-e.html
Regards,
Richard Broersma Jr.
---(end of broadcast)-
On Thursday 29 June 2006 09:08, "Jasbinder Bali" <[EMAIL PROTECTED]> wrote:
> in my bash script where and how do i specify the database connection
> parameters
man psql
--
Alan
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner wil
On Thu, 2006-06-29 at 11:29, Jasbinder Bali wrote:
> isn't my normal bash script different from psql.
> In a bash script how wud u specify the db parameters
Look at how I'm doing it here:
> > > query="select * from sometable";
> > > a=`echo $query|psql -tq dbname`;
Note that I'm
isn't my normal bash script different from psql.
In a bash script how wud u specify the db parameters
On 6/29/06, Scott Marlowe <[EMAIL PROTECTED]> wrote:
On Thu, 2006-06-29 at 11:08, Jasbinder Bali wrote:>> On 6/29/06, Scott Marlowe <
[EMAIL PROTECTED]> wrote:> On Thu, 2006-06-29 at 10:24
On Thu, 2006-06-29 at 11:08, Jasbinder Bali wrote:
>
> On 6/29/06, Scott Marlowe <[EMAIL PROTECTED]> wrote:
> On Thu, 2006-06-29 at 10:24, Jasbinder Bali wrote:
> > > Hi
> > > I need to connect to the postgres database using my unix shell.
> > > How should i go about it?
> > > Is libpq
in my bash script where and how do i specify the database connection parameters
~Jas
On 6/29/06, Scott Marlowe <[EMAIL PROTECTED]> wrote:
On Thu, 2006-06-29 at 10:24, Jasbinder Bali wrote:> Hi> I need to connect to the postgres database using my unix shell.
> How should i go about it?> Is libpq go
On Thu, 2006-06-29 at 10:24, Jasbinder Bali wrote:
> Hi
> I need to connect to the postgres database using my unix shell.
> How should i go about it?
> Is libpq going to be helpful here?
There is a shell interface for postgresql called psql.
If you have postgresql installed on a box, then the psq
> I need to connect to the postgres database using my unix shell.
> How should i go about it?
> Is libpq going to be helpful here?
If postgres is install on the unix server, you can use the postgreSQL client
that installs with
the server.
it is called psql.
Regards,
Richard Broersma Jr.
-
Hi
I need to connect to the postgres database using my unix shell.
How should i go about it?
Is libpq going to be helpful here?
Thanks and regards,
~Jas
18 matches
Mail list logo