Andrew Dunstan wrote:
This is a furfy that has been raised before and explained before.
Of course, as usual I misspelled it, the word is "furphy". I didn't
realise that it was an Australianism. It means more or less "a red
herring". Wikipedia says that it is a term particularly popular in
Decibel! wrote:
On Fri, Aug 31, 2007 at 01:41:47PM -0400, Andrew Dunstan wrote:
The technique of using a lookup table that you seem to refer to doesn't
need any special support from the catalogs or the type system. It's used
today in millions of applications. But it can have quite a high c
On Fri, Aug 31, 2007 at 01:41:47PM -0400, Andrew Dunstan wrote:
> The technique of using a lookup table that you seem to refer to doesn't
> need any special support from the catalogs or the type system. It's used
> today in millions of applications. But it can have quite a high cost in
> extra j
Decibel! wrote:
The last time I worked on a project where we had C code access the
database, we added stuff to map C enums to ints in the database (along
with a parent table to store the enum label). ISTM it'd be good if we
had a way to get the numeric index out of an enum.
If you mean here
On Fri, Aug 31, 2007 at 08:49:05AM -0400, Merlin Moncure wrote:
> On 8/30/07, Tom Lane <[EMAIL PROTECTED]> wrote:
> > "Merlin Moncure" <[EMAIL PROTECTED]> writes:
> > > I noticed that enums are not available to be queried as binary through
> > > the protocol.
> >
> > What do you think the binary re
Gregory Stark wrote:
enum OIDs are unique across enums? This seems like a strange way to do it. I
recall conversations about this a while back though and there were limitations
of the type system that led to this, right?
No, not the type system as such. It stems from this quote from Tom:
Gregory Stark <[EMAIL PROTECTED]> writes:
> enum OIDs are unique across enums? This seems like a strange way to do it.
That decision was already made, we are not revisiting it (at least not
for 8.3).
regards, tom lane
---(end of broadcast)-
"Alvaro Herrera" <[EMAIL PROTECTED]> writes:
> Gregory Stark escribió:
>
>> I think it would be ok only if a pg_dump/pg_restore reliably restored the
>> same
>> oid->enum value mapping. Otherwise a binary dump is useless. But as I
>> understand it that's the case currently, is it?
er, lost a "n
Gregory Stark escribió:
> I think it would be ok only if a pg_dump/pg_restore reliably restored the same
> oid->enum value mapping. Otherwise a binary dump is useless. But as I
> understand it that's the case currently, is it?
That doesn't work if the dump is restored on a database that already h
"Merlin Moncure" <[EMAIL PROTECTED]> writes:
> On 8/30/07, Tom Lane <[EMAIL PROTECTED]> wrote:
>> "Merlin Moncure" <[EMAIL PROTECTED]> writes:
>> > I noticed that enums are not available to be queried as binary through
>> > the protocol.
>>
>> What do you think the binary representation ought to b
"Merlin Moncure" <[EMAIL PROTECTED]> writes:
> On 8/30/07, Tom Lane <[EMAIL PROTECTED]> wrote:
>> What do you think the binary representation ought to be? Copying OIDs
>> seems pretty useless.
> I actually think this would be ok, if you mean pg_enum.oid, or the
> string would be fine too. I agre
Merlin Moncure wrote:
One other very small observation: afaict, there appears to be no way
to list enum contents in psql (although you can list the enums
themselves in the type listing).
select enum_range(null::myenumtype);
I'm willing to take a stab at these things if Andrew is busy.
On 8/30/07, Tom Lane <[EMAIL PROTECTED]> wrote:
> "Merlin Moncure" <[EMAIL PROTECTED]> writes:
> > I noticed that enums are not available to be queried as binary through
> > the protocol.
>
> What do you think the binary representation ought to be? Copying OIDs
> seems pretty useless.
I'm on the
Tom Lane wrote:
What if we just defined the binary format as being identical to the text
format, ie, the enum label? A bit silly but at least it would eliminate
the gotcha that binary I/O fails.
So we should pretty much mimic text_send/text_recv? If so I can probably
get that d
What if we just defined the binary format as being identical to the text
format, ie, the enum label? A bit silly but at least it would eliminate
the gotcha that binary I/O fails.
Seems like it would make a lot more sense to the client application that
way too...
-- Korry
Andrew Dunstan <[EMAIL PROTECTED]> writes:
> Merlin Moncure wrote:
>> I noticed that enums are not available to be queried as binary through
>> the protocol.
> The trouble is that an enum doesn't have an immutable internal binary value.
> I guess we could say that the binary value is the integer
"Merlin Moncure" <[EMAIL PROTECTED]> writes:
> I noticed that enums are not available to be queried as binary through
> the protocol.
What do you think the binary representation ought to be? Copying OIDs
seems pretty useless.
regards, tom lane
---
Merlin Moncure wrote:
I noticed that enums are not available to be queried as binary through
the protocol. Is this a known issue? Too late to fix for 8.3? This
is kind of a pain, because it forces any query that returns an enum to
return the entire result as text. afaik, enums are the only
I noticed that enums are not available to be queried as binary through
the protocol. Is this a known issue? Too late to fix for 8.3? This
is kind of a pain, because it forces any query that returns an enum to
return the entire result as text. afaik, enums are the only POD type
to behave this wa
19 matches
Mail list logo