Re: [SQL] Queyring for columns which are exist in table.

2011-01-25 Thread msi77
Why would not use information schema to checking of existence of some column in a table: select column_name from information_schema.columns where table_name='tbl' -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpr

[SQL] pgbench tools

2011-01-25 Thread manuel antonio ochoa
Hello, I run ./runtest it begin and insert some tuples like 1000 tuples done. and the i have this problem : Run set #3 of 3 with 16 clients scale=100 Running tests using: psql -h 192.170.1.82 -U postgres -p 5432 -d pgbench Storing results using: psql -h 192.170.1.82 -U postgres -p 5432 -d resu

Re: [SQL] Benchmarking

2011-01-25 Thread Scott Marlowe
On Tue, Jan 25, 2011 at 10:39 AM, manuel antonio ochoa wrote: > hello > > do you know a tool to benchmark my dbase  and the basic test that I need to > do ? > I found a pgbench !!! ... pgbench can be used as a generic testing tool by giving it a new set of sql statements to run with the -f s

[SQL] Benchmarking

2011-01-25 Thread manuel antonio ochoa
hello do you know a tool to benchmark my dbase and the basic test that I need to do ? I found a pgbench !!! ...

Re: [SQL] control function pgsql with script bash

2011-01-25 Thread Joshua Tolley
On Tue, Jan 25, 2011 at 10:46:58AM -0600, manuel antonio ochoa wrote: > Good morning > > I want to check if the function pgsql execute correctly into my bash > script . > I have something like this : > > /var/lib/pgsql/bin/./psql -U 'USER' -d DATABSE -p 5432 -h iphost -c > "select antro

Re: [SQL] create geometry by lat/long

2011-01-25 Thread Joshua Tolley
On Tue, Jan 25, 2011 at 03:10:59AM -0800, gargdevender74 wrote: > > how to create geometry (EPSG:4326) by lat/long. plz advice Try ST_Point and ST_SetSRID() http://www.postgis.org/docs/ST_Point.html -- Joshua Tolley / eggyknap End Point Corporation http://www.endpoint.com signature.asc Descri

[SQL] control function pgsql with script bash

2011-01-25 Thread manuel antonio ochoa
Good morning I want to check if the function pgsql execute correctly into my bash script . I have something like this : /var/lib/pgsql/bin/./psql -U 'USER' -d DATABSE -p 5432 -h iphost -c "select antros.changethenames( )" how can i get the error if the function changethenames() send me

Re: [SQL] Control reached end of trigger procedure without RETURN

2011-01-25 Thread MoNiLlO
El 25/01/2011 16:06, Tom Lane escribió: > MoNiLlO writes: >> When I launch one insert returns error: >> I put the function and the returned error. >> CREATE OR REPLACE FUNCTION ventas_det_a_ventas_imp() >> RETURNS trigger AS >> ... >> ERROR: control reached end of trigger procedure without RET

Re: [SQL] Control reached end of trigger procedure without RETURN

2011-01-25 Thread MoNiLlO
El 25/01/2011 16:06, Tom Lane escribió: > MoNiLlO writes: >> When I launch one insert returns error: >> I put the function and the returned error. >> CREATE OR REPLACE FUNCTION ventas_det_a_ventas_imp() >> RETURNS trigger AS >> ... >> ERROR: control reached end of trigger procedure without RET

[SQL] create geometry by lat/long

2011-01-25 Thread gargdevender74
how to create geometry (EPSG:4326) by lat/long. plz advice -- View this message in context: http://postgresql.1045698.n5.nabble.com/create-geometry-by-lat-long-tp3356073p3356073.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sq

Re: [SQL] Control reached end of trigger procedure without RETURN

2011-01-25 Thread Adelo Herrero
El 24/01/2011 19:19, Andrej escribió: > And, since the list is in English - please translate? I'm sorry, I started writing and the language ... :-( I have a function that is triggered in a trigger whose purpose is, create a record in another table or update and return the id of the record crea

Re: [SQL] Control reached end of trigger procedure without RETURN

2011-01-25 Thread Adelo
El 25/01/2011 16:06, Tom Lane escribió: > MoNiLlO writes: >> When I launch one insert returns error: >> I put the function and the returned error. >> CREATE OR REPLACE FUNCTION ventas_det_a_ventas_imp() >> RETURNS trigger AS >> ... >> ERROR: control reached end of trigger procedure without RET

Re: [SQL] Control reached end of trigger procedure without RETURN

2011-01-25 Thread Tom Lane
MoNiLlO writes: > When I launch one insert returns error: > I put the function and the returned error. > CREATE OR REPLACE FUNCTION ventas_det_a_ventas_imp() > RETURNS trigger AS > ... > ERROR: control reached end of trigger procedure without RETURN > CONTEXT: PL/pgSQL function "ventas_imp_a

[SQL] Queyring for columns which are exist in table.

2011-01-25 Thread Santosh Bhujbal (sabhujba)
Hi All, I want to fire a query such that if the particular column does not exist then query should return some default value. For that I have tried following experiment. CREATE TABLE tbl ( c1 integer, c2 integer, c3 integer ); INSERT INTO tbl VALUES (1, 2, 3); INSERT I

Re: [SQL] Control reached end of trigger procedure without RETURN

2011-01-25 Thread Adelo
El 24/01/2011 19:19, Andrej escribió: > And, since the list is in English - please translate? I'm sorry, I started writing and the language ... :-( I have a function that is triggered in a trigger whose purpose is, create a record in another table or update and return the id of the record crea

Re: [SQL] Control reached end of trigger procedure without RETURN

2011-01-25 Thread MoNiLlO
El 24/01/2011 19:19, Andrej escribió: > And, since the list is in English - please translate? I'm sorry, I started writing and the language ... :-( I have a function that is triggered in a trigger whose purpose is, create a record in another table or update and return the id of the record creat