Re: change natural column order - Mailing list pgsql-general

From Steve Atkins
Subject Re: change natural column order
Date
Msg-id 20041201000857.GA15143@gp.word-to-the-wise.com
Whole thread Raw
In response to Re: change natural column order  ("Dann Corbit" <DCorbit@connx.com>)
List pgsql-general
On Tue, Nov 30, 2004 at 03:03:37PM -0800, Dann Corbit wrote:

> Using "SELECT * FROM <table_name>" from the PSQL prompt or any other interactive tool is perfectly fine.
>
> Putting "SELECT * FROM <table_name>" into a compiled program using libpq or ESQL is a code defect.  Period.

This looks like misinformation, a misunderstanding of the data
available from libpq or a misunderstanding of how any language more
sophisticated than C[1] tends to access data structures

Would you care to expand on why you think this...

  my $row = $dbh->selectrow_hashref("select * from $table");
  print 'foo = ', $row{'foo'};

...is inherently a a code defect?

Cheers,
  Steve

[1] Not that there's anything wrong with the moral equivalent of
    PQgetvalue(res, 0, PQfnumber(res, "foo")) other than a slightly
    clumsy syntax.

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Postgres Design
Next
From: Jamie Deppeler
Date:
Subject: Trigger Problems