Conditional SQL query - Mailing list pgsql-sql

From Indraneel Majumdar
Subject Conditional SQL query
Date
Msg-id Pine.SGI.3.96.1001105105556.902905A-100000@www.cdfd.org.in
Whole thread Raw
In response to Re(2): Large Object dump ?  ("pgsql-sql" <pgsql-sql@fc.emc.com.ph>)
List pgsql-sql
Hi,

how can I insert a record after checking whether one of the fields has a
certain value or not? eg:

if table(col1)='value' insert into table values (x,x,x)

I am using perl interface. Is there any way to define a function to take
table name as an argument? (eg: select * from $table) I tried but this
gave an error (so I'm using perl to pass the real tablename for each
query)

Any help will be great,
Indraneel

/************************************************************************.
# Indraneel Majumdar                  ¡  E-mail: indraneel@123india.com  #
# Bioinformatics Unit (EMBNET node),  ¡  URL: http://scorpius.iwarp.com  #
# Centre for DNA Fingerprinting and Diagnostics,                         #
# Hyderabad, India - 500076                                              #
`************************************************************************/



pgsql-sql by date:

Previous
From: kovacsz
Date:
Subject: PLPGSQL performance
Next
From: hubert depesz lubaczewski
Date:
Subject: Question about ordering views