On Thu, 23 Oct 2003, Peter Childs wrote:
>
>
> On Thu, 23 Oct 2003 [EMAIL PROTECTED] wrote:
>
> > On Thu, 23 Oct 2003, Abdul Wahab Dahalan wrote:
> >
> > > Hi!
> > > How do I list all the tables in the database which has a same column name?.
> >
> > SELECT t1.relname,a1.attname,t2.relname from
On Thu, 23 Oct 2003, Abdul Wahab Dahalan wrote:
> Hi!
> How do I list all the tables in the database which has a same column name?.
SELECT t1.relname,a1.attname,t2.relname from pg_class t1,pg_attribute
a1,pg_class t2,pg_attribute a2 where a1.attrelid=t1.oid and t1.relkind='r'
and a1.attnum>0 an
On Wed, 22 Oct 2003, Abdul Wahab Dahalan wrote:
> Hi !
> In my database I've a field "departure" with timestamp without time zone
> data type.
> eg :
> departure
> 2003-11-01 14:29:46
Maybe
SET DateStyle TO 'German' ;
SELECT replace(departure,'.','-') from ;
is close to what you want,
but be
On Mon, 20 Oct 2003, A.Bhuvaneswaran wrote:
> > Why dont you try to write your trigger in C?
>
> Hi, one cannot write triggered procedures in C. Currently, it can only be
> written in plpsgql.
Where did you get that impression from?
Do an
SELECT tgrelid,tgfoid,proname from pg_trigger,pg_proc wh
Why dont you try to write your trigger in C?
On Mon, 20 Oct 2003, Dmitri Fuerle wrote:
>
>I'm writing a trigger but running into problems. My problem is that I can not
> determine anyway to tell what fields are in the *new* record. Without knowing what
> fields are there I get runtime e
On Fri, 17 Oct 2003, Kumar wrote:
> But I have get into another problem. While I execute the following command I
> could get the result as U can see below
>
> etgsuite=# SELECT a.attname,format_type(a.atttypid, a.atttypmod),
> a.attnotnull, a.atthasd
> ef, a.attnum
> FROM pg_class c, pg_attribute
On Fri, 3 Oct 2003, Tom Lane wrote:
>
> I think in 7.4 there may be an optimization that skips the tuple
> projection step in this particular case, but if you can in fact see
> t_tableOid in 7.4, it'd be an implementation artifact rather than
> something we will promise to support in future. The
Hi,
i notice that when HeapTuple data are populated by a trigger
then the table oid can be retrieved from HeapTuple->t_tableOid.
When HeapTuple is populated by
SPI_exec("select * from foobar when id=667");
tuple = SPI_tuptable->tvals[0] (id is PK and row with 667 exists)
then tuple->t_tableOid
Well, in certain filesystems you can have the birth time
(like ufs2) stored in the inode struct.
So you find the file name in your $PGDATA/base directory
using the oid of your table (in pg_class),
and then you open that file with stat (2) or utimes (2) (or
from perl) to read creation data.
All t