I thought that this was going to be tricky.
Perhaps I could use rules to populate a shadow table that is like a INNER JOIN
of the two tables. This would consolidate the Boolean on the separate table
into the same table that holds the time ranges. In version 8.4 I would still
need to use explic
I have a temporal data question that may be much easier to handle in version
9.x but I am stuck on version 8.4.
One table has a time range that is implemented as start_time and end_time
columns of type TIMESTAMP with Timezone.
A second table has information that is needed to determine if there i
I simplified my example somewhat. I usually have six of these "optional"
parameters.
The number of prepared statements would be too many for this approach.
I will follow your advice in the cases where I just one or two of the
"optional" parameters.
Looks like I will need to dynamically build my
I am currently dynamically building a SQL command in my C code like that
executes SQL statement like:
INSERT INTO t (c1,c2,c3,c4,c5) VALUES ('abc', 1, DEFAULT, 9, 3);
I execute the command using PQexec() of libpq.
The application logic determines when to use the default values for several
I have a table where I would like the primary key to be generated during
the insert.
Here is a simplified example:
CREATE TABLE employee_type
{
tname varchar(10) PRIMARY KEY,
id_prefix char(1) ;
...
}
tname | id_prefix
--+--
worker | W
manager | M
exec
I have a client application that needs:
SELECT a set of records from a table and lock them for potential
updates.
for each record
make some updates to this record and some other records in other
tables
call some call a function that does some application logic that
does not access the da
Let's say I have a table foo with a column color where the color column
is defined as an integer but in my application space is an enumeration:
Table "public.foo"
Column |Type | Modifiers
---+-