[ADMIN] Binding Parameters

2004-09-10 Thread Postgres User
I'm new to PostgreSQL, and am wondering for BindSQL is intergrated in 
Postgres or in the future for version 8.

Example:
SELECT * FROM sample_table WHERE computer = :1;
Any pointers will help.
Thanks,
J
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [ADMIN] Binding Parameters

2004-09-11 Thread Postgres User

Do you mean PREPARE / EXECUTE?
/* [EMAIL PROTECTED]:5432/ahammond =# */ \d foo
~   Table "public.foo"
~ Column |  Type   |  Modifiers
- +-+--
~ foo_id | integer | not null default nextval('foo_id_seq'::text)
~ name   | text| not null
Indexes:
~"foo_id_idx" unique, btree (foo_id)
~"foo_name_idx" unique, btree (name)
/* [EMAIL PROTECTED]:5432/ahammond =# */ SELECT * FROM foo;
~ foo_id | name
- +--
~  1 | a
~  2 | b
~  3 | c
~  4 | d
~  5 | f
(5 rows)
/* [EMAIL PROTECTED]:5432/ahammond =# */ PREPARE foo_name (integer) AS
SELECT name FROM foo WHERE foo_id = $1;
PREPARE
/* [EMAIL PROTECTED]:5432/ahammond =# */ EXECUTE foo_name (1);
~ name
- --
~ a
(1 row)
/* [EMAIL PROTECTED]:5432/ahammond =# */ EXECUTE foo_name (4);
~ name
- --
~ d
(1 row)
Thanks for the short tutorial... I think that I've gotten the point.  I 
was searching online and nothing proved useful.

Anymore more examples or direction on finding any of bind parameter is 
appreciated.
J

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[ADMIN] PREPARE/EXECUTE questions

2004-10-18 Thread Postgres User
I'm writing a web application inwhich clients will login/out among other 
stuff. I have be reading on prepared statements and leave you all with 
an open-ended question.  Are prepared statements better and how can I 
program them to not end at the once the session is over?

Thanks, any other suggestions are welcome.
J
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [ADMIN] PREPARE/EXECUTE questions... custom functions?

2004-10-18 Thread Postgres User
Joshua D. Drake wrote:
Use a connection pooler like pgpool.
Thanks for the suggestion, I will look into it and test. There seems to 
some overhead using that tool. What about custom functions, written in 
SQL or C?  They seem to work until the database is shut down, any 
thoughts about that for a custom application?  Pros/Cons...

Thanks in advance,
J
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


[ADMIN] SQL Functions

2004-10-19 Thread Postgres User
What are the advantages to SQL Functions?  I'm looking to optimize 
'default' PostgreSQL environments for clients. I'm writing an 
application and looking to put functions to optimize just that table, 
etc. They don't want to have a full-time database admin (surprise!).

Thanks,
J
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[ADMIN] Steps for Record-based Log Shipping postgres 8.2

2008-06-17 Thread CDS PostGres User
Hi,

What are steps/code for Record-based Log Shipping postgres 8.2?
If use Record-based Log Shipping can I access both primary and standby
server simultaniously.

Tarun

-- 
Sent via pgsql-admin mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin